Re: [Maya-Python] The gameFbxExporter 'gameExporterPreset1' has no '.ich' attribute.

2023-11-15 Thread Juan Moraga
Hello,

I don't use gameFbxExporter, are those nodes created automatically by Maya?
or is this an export preset that you have been given? If those are
given,maybe the export preset is incompatible with your version.
You also have a white space here:
nodes = cmds.ls(type="gameFbxExporter  ") , in case this is the actual
command you are using within maya.

Generally if you cannot delete a node inside Maya, it tends to be because
you are not supposed to do so, be it because it is part of a reference, or
because someone locked the node.
If you want to delete that node, you can try unlocking it first:
node = "gameExporterPreset1"
cmds.lockNode(node, lock=False)

On Wed, 15 Nov 2023 at 13:48, Utkarsh Agnihotri 
wrote:

> Hi,
> I am trying to do batch export on a set of files but keep getting
> interrupted by following errors
>
> *The gameFbxExporter 'gameExporterPreset1' has no '.ich' attribute.*
>
> Nodes named gameExporterPreset1 are causing the issue. I tried to delete
> them after opening the file in script but it is failing to do so. These are
> gameFbxExporter  type nodes and trying to delete them using
>
> nodes = cmds.ls(type="gameFbxExporter  ")
> for node in nodes:
> cmds.select(node)
> cmds.delete(node)
>
> Has any faced same issue?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Python Programming for Autodesk Maya" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to python_inside_maya+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/383c508b-eea5-4999-a0b6-ae732decb06an%40googlegroups.com
> <https://groups.google.com/d/msgid/python_inside_maya/383c508b-eea5-4999-a0b6-ae732decb06an%40googlegroups.com?utm_medium=email_source=footer>
> .
>


-- 
*Juan Moraga*
*Supervising Pipeline & Technical Direction @ MondoTV*

Portfolio: https://juanmoraga.dev
LInkedin: https://www.linkedin.com/in/juanmoragamartin/
<http://juanmoragaart.tumblr.com/>

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to python_inside_maya+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CA%2BKy2f0CE9ccFpOTpoTQ835pxhnk6TQurFwgjcUEHceXAOioTA%40mail.gmail.com.


Re: [Maya-Python] Query maya scene info with references

2023-11-15 Thread Juan Moraga
I'm glad it worked :)

On Wed, 15 Nov 2023 at 10:20, Utkarsh Agnihotri 
wrote:

> Yes, but I was having issue with the command. But Juan' suggestion also
> worked.
> Thank you for the help.☺️
>
> On Wed, Nov 15, 2023 at 10:32 AM Marcus Ottosson 
> wrote:
>
>> Hm, then you've got all information.
>>
>> 1. You can find the path to the currently saved file
>> 2. You can find the path to any referenced file in your scene
>>
>> Is there anything else you are looking for? Can you provide a way to
>> reproduce what you are seeing?
>>
>> On Wed, 15 Nov 2023 at 08:48, Utkarsh Agnihotri 
>> wrote:
>>
>>> Hi, no, not for this one. Only file name and path.
>>> On Wed 15. Nov 2023 at 09:20, Marcus Ottosson 
>>> wrote:
>>>
>>>> Aha, you are trying to find the path to the referenced file? In that
>>>> case, Maya maintains each reference in a node of type “reference”. You can
>>>> then query various properties of this node, including the full path to the
>>>> file it references.
>>>>
>>>> for reference in cmds.ls(type="reference"):
>>>> fname = cmds.referenceQuery(reference, filename=True)
>>>> print(fname)
>>>>
>>>>
>>>> On Wed, 15 Nov 2023 at 03:07, Juan Moraga 
>>>> wrote:
>>>>
>>>>> what about: cmds.file(q=True, l=True)[0]?
>>>>>
>>>>> On Tue, 14 Nov 2023, 23:09 Utkarsh Agnihotri, 
>>>>> wrote:
>>>>>
>>>>>> I have a scene with referenced rig e.g. walk.ma. I am trying query
>>>>>> the scene name so that I can export a fbx with same name. How ever, 
>>>>>> scenes
>>>>>> with references are not returning anything.
>>>>>>
>>>>>> On Tue 14. Nov 2023 at 23:11, Marcus Ottosson 
>>>>>> wrote:
>>>>>>
>>>>>>> That definitely should work, independent of references. How can I
>>>>>>> reproduce what you see?
>>>>>>>
>>>>>>> Here’s what I see:
>>>>>>>
>>>>>>> from maya import cmds
>>>>>>> # Make an original scene to reference
>>>>>>> cmds.polyCube()
>>>>>>> cmds.file(rename="referenceMe.ma")
>>>>>>> cmds.file(save=True, type="mayaAscii")
>>>>>>> # Make a new scene, and reference the original scene
>>>>>>> cmds.file(new=True, force=True)
>>>>>>> cmds.file("referenceMe.ma", reference=True)
>>>>>>> cmds.file(rename="newScene.ma")
>>>>>>>
>>>>>>> fname = cmds.file(query=True, sceneName=True)assert 
>>>>>>> fname.endswith("newScene.ma")
>>>>>>>
>>>>>>>
>>>>>>> On Tue, 14 Nov 2023 at 16:50, Utkarsh Agnihotri <
>>>>>>> utkarsh6...@gmail.com> wrote:
>>>>>>>
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> I am trying to query Maya scene name and path using
>>>>>>>>
>>>>>>>> main_scene_file = cmds.file(q=True, sceneName=True)
>>>>>>>>
>>>>>>>> But it doesn't work when there are references in the scene. Does
>>>>>>>> anyone how can I fix that?
>>>>>>>>
>>>>>>>> Thanks :)
>>>>>>>>
>>>>>>>> --
>>>>>>>> You received this message because you are subscribed to the Google
>>>>>>>> Groups "Python Programming for Autodesk Maya" group.
>>>>>>>> To unsubscribe from this group and stop receiving emails from it,
>>>>>>>> send an email to python_inside_maya+unsubscr...@googlegroups.com.
>>>>>>>> To view this discussion on the web visit
>>>>>>>> https://groups.google.com/d/msgid/python_inside_maya/f11a3271-498a-4857-8a8b-a12e171086e4n%40googlegroups.com
>>>>>>>> <https://groups.google.com/d/msgid/python_inside_maya/f11a3271-498a-4857-8a8b-a12e171086e4n%40googlegroups.com?utm_medium=email_source=footer>
>>>>>>>> .
>>>>>>>>
>>>>>>> --
>>>>>>> You received this message because you are subscribed to a topi

Re: [Maya-Python] Hiding individual tabs in a tab layout?

2023-11-15 Thread Juan Moraga
You can generate a Qt class instance, from a cmds gui widget using
wrapInstance from shiboken.
I have used this in the past:

from PySide2.QtWidgets import QMenu
from maya.OpenMayaUI import MQtUtil
from shiboken2 import wrapInstance
from maya import cmds

cmds_menu: str = cmds.menu(label="cmds_menu", parent="MayaWindow").split("|"
)[-1]
control: "SwigPyObject" = MQtUtil.findControl(str(cmds_menu))
qt_menu: QMenu = wrapInstance(int(control), QMenu)



On Wed, 15 Nov 2023 at 08:15, Marcus Ottosson 
wrote:

> In that case, I can think of 2 options.
>
>1. See if there’s another command in cmds you could use to manipulate
>already-created tabs, I’m not familiar with this part myself so can’t say
>for sure
>2. Alternatively, whatever cmds does it is Qt that is ultimately
>drawing the tabs, which means you can access them via PySide to perform
>further manipulation
>
> I suspect there is a method of converting a widget created via cmds to
> its corresponding Qt widget, from there you can navigate the widget via
> widget.parent() and widget.children() until you find the QTabWidget or
> whichever widget is doing the drawing of tabs. If there isn’t such a
> method, you can navigate from top-down via
> PySide.QWidgets.QApplication.instance() or by finding the Maya main
> window.
>
> On Tue, 14 Nov 2023 at 22:34, Ravi Jagannadhan  wrote:
>
>> Alas, they're made via cmds.
>>
>> On Tue, Nov 14, 2023 at 2:07 PM Marcus Ottosson 
>> wrote:
>>
>>> It would depend on how the tabs are made, are they made via PySide or
>>> cmds?
>>>
>>> On Tue, 14 Nov 2023 at 16:27, Ravi Jagannadhan  wrote:
>>>
>>>> Hi all, is it possible to hide individual tabs in a tab layout?
>>>>
>>>> Ravi
>>>> —
>>>> “There are no dumb questions” - Carl Sagan
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Python Programming for Autodesk Maya" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to python_inside_maya+unsubscr...@googlegroups.com.
>>>> To view this discussion on the web visit
>>>> https://groups.google.com/d/msgid/python_inside_maya/BL3PR10MB61639DFE04B08ABB150636B5F6B2A%40BL3PR10MB6163.namprd10.prod.outlook.com
>>>> <https://groups.google.com/d/msgid/python_inside_maya/BL3PR10MB61639DFE04B08ABB150636B5F6B2A%40BL3PR10MB6163.namprd10.prod.outlook.com?utm_medium=email_source=footer>
>>>> .
>>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Python Programming for Autodesk Maya" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to python_inside_maya+unsubscr...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOAqkenkr4Zmp%3D4wwQT44f17o7cmw3x8yAkjQD22uJaJ%3DQ%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOAqkenkr4Zmp%3D4wwQT44f17o7cmw3x8yAkjQD22uJaJ%3DQ%40mail.gmail.com?utm_medium=email_source=footer>
>>> .
>>>
>>
>>
>> --
>> Where we have strong emotions, we're liable to fool ourselves - Carl Sagan
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Python Programming for Autodesk Maya" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to python_inside_maya+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/python_inside_maya/CADHeb2YMEGtjZ%2B7eyPNxwkMBjpLdAPkNMv-rdJJg8Eiu5hdn6w%40mail.gmail.com
>> <https://groups.google.com/d/msgid/python_inside_maya/CADHeb2YMEGtjZ%2B7eyPNxwkMBjpLdAPkNMv-rdJJg8Eiu5hdn6w%40mail.gmail.com?utm_medium=email_source=footer>
>> .
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Python Programming for Autodesk Maya" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to python_inside_maya+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOCMOmhg7O132tSguZKqkN2cS9%3DG8weu1YKfe903RkRpUA%40mail.gmail.com
> <https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOCMOmhg7O132tSguZKqkN2cS9%3DG8weu1YKfe903RkRpUA%40mail.gmail.com?utm_medium=email_source=footer>
> .
>


-- 
*Juan Moraga*
*Supervising Pipeline & Technical Direction @ MondoTV*

Portfolio: https://juanmoraga.dev
LInkedin: https://www.linkedin.com/in/juanmoragamartin/
<http://juanmoragaart.tumblr.com/>

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to python_inside_maya+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CA%2BKy2f0UHidUGDSOmOxy0bQJSGMr45nGThgZ1SrfFJ1p2mJBZg%40mail.gmail.com.


Re: [Maya-Python] Query maya scene info with references

2023-11-14 Thread Juan Moraga
what about: cmds.file(q=True, l=True)[0]?

On Tue, 14 Nov 2023, 23:09 Utkarsh Agnihotri,  wrote:

> I have a scene with referenced rig e.g. walk.ma. I am trying query the
> scene name so that I can export a fbx with same name. How ever, scenes with
> references are not returning anything.
>
> On Tue 14. Nov 2023 at 23:11, Marcus Ottosson 
> wrote:
>
>> That definitely should work, independent of references. How can I
>> reproduce what you see?
>>
>> Here’s what I see:
>>
>> from maya import cmds
>> # Make an original scene to reference
>> cmds.polyCube()
>> cmds.file(rename="referenceMe.ma")
>> cmds.file(save=True, type="mayaAscii")
>> # Make a new scene, and reference the original scene
>> cmds.file(new=True, force=True)
>> cmds.file("referenceMe.ma", reference=True)
>> cmds.file(rename="newScene.ma")
>>
>> fname = cmds.file(query=True, sceneName=True)assert 
>> fname.endswith("newScene.ma")
>>
>>
>> On Tue, 14 Nov 2023 at 16:50, Utkarsh Agnihotri 
>> wrote:
>>
>>> Hi,
>>>
>>> I am trying to query Maya scene name and path using
>>>
>>> main_scene_file = cmds.file(q=True, sceneName=True)
>>>
>>> But it doesn't work when there are references in the scene. Does anyone
>>> how can I fix that?
>>>
>>> Thanks :)
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Python Programming for Autodesk Maya" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to python_inside_maya+unsubscr...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/python_inside_maya/f11a3271-498a-4857-8a8b-a12e171086e4n%40googlegroups.com
>>> 
>>> .
>>>
>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "Python Programming for Autodesk Maya" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/python_inside_maya/_avaEPrznr4/unsubscribe
>> .
>> To unsubscribe from this group and all its topics, send an email to
>> python_inside_maya+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/python_inside_maya/CAFRtmODh9pD7iuHHbUG3EfX8VV3ukO-k-R97LqkNSqYNDCFOfA%40mail.gmail.com
>> 
>> .
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Python Programming for Autodesk Maya" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to python_inside_maya+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/CAPCRbh-JZ5OABbSg7JMF06MAmCPOC7eubsbKSi4EROjbABMtjQ%40mail.gmail.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to python_inside_maya+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CA%2BKy2f2_x4yjKwQ3%2Bs6-e%3DowyuGGQBMAqiUAxjPBf-GQanazfg%40mail.gmail.com.


Re: [Maya-Python] PyMEL 1.3.0 Released

2023-04-17 Thread Juan Moraga
I think that using pip with python 3 is not as incovinient as it was with
python 2, where you may had to look for built wheels sometimes, because 2
had been legacy for years, so maybe now more people use it, I guess you
need to be aware of things like walrus op, which I love, but its not
available until 3.8, so Maya 2022 doesn't have it.
I have always used the maya modules, so in a way I appreciate not having
PyMEL bundled, as I don't use it, but I can imagine that libs that depend
on PyMEL will explain how to run pip and install it.

On Mon, 17 Apr 2023, 10:56 Justin Israel,  wrote:

>
>
> On Mon, 17 Apr 2023, 8:11 pm Marcus Ottosson, 
> wrote:
>
>> I know that pip installing is a bit less convenient
>>
>> Just adding my two cents to this on how it is not just a bit less
>> convenient, but a complete killer in some cases; the cases that are most
>> important from my perspective. Namely, external tools development. Take
>> mGear for example. A general purpose auto rigging solution built on PyMEL.
>> Their potential userbase went from all Maya users to the few who are
>> capable of using pip. From riggers to riggers with scripting and
>> pipeline experience. A tiny fraction of what it used to be. As a result,
>> they will likely need to move away from PyMEL to regain their audience. And
>> in my case, had I built Ragdoll Dynamics on PyMEL, I would not only had
>> lost userbase, but the vast majority of revenue for my business. My
>> audience isn’t even riggers, but animators. An audience that is not
>> expected to know anything about pip or even Python. And certainly would
>> not be able to do pull-through caching on Nexus or Artifactory.
>>
>
> I don't know. This sounds quite over-dramatic to me. We are talking about
> the requirement of a single command to install PyMEL, documented by
> Autodesk, using mayapy and a bundled pip module. Is it a stretch to expect
> a user to run the command? Is it considered a significantly more complex
> step than the instructions a given plugin will list to copy/install the
> plugin in the first place? It just seems far fetched to suggest the new
> requirement will lose the majority of the user base because it is too
> technical. It could be one more step added to the install instructions of
> the plugin.
> But maybe there are other complications, such as breaking changes between
> PyMEL releases and 2 different plugins having different requirements on old
> and new behavior and really only one can be installed in Maya. That seems
> like more of a potential problem than the installation step issue. You
> mentioned vendoring support for PyMEL into plugin projects.
>
> I have great respect and appreciation for PyMEL; it’s how I personally
>> went from learning Python with maya.cmds to object-oriented thinking and
>> API design. But it’s now in the tough position of drawing a crowd of Python
>> beginners who is now also expected to know the down and dirty of Python and
>> package management. Not to mention that their audience will now have an
>> unpredictable version of PyMEL installed their users system, and having to
>> account for the differences in their own tools.
>>
>> A possible solution that I’d recommend is making PyMEL vendorable.
>> Something tools developers can embed into their project such that (1) the
>> end-user won’t need to install anything and (2) the version developed
>> against remain consistent with the tool. For a project like PyMEL, I’d
>> imagine this to be a tall order. But unless something is done, pip
>> installing isn’t merely less convenient, but a PyMEL killer, IMO.
>>
>> On Fri, 7 Apr 2023 at 16:22, Chad Dombrova  wrote:
>>
>>> Hi all,
>>> PyMEL 1.3.0 has been released to PyPI. Those of you paying attention to
>>> recent releases of Maya may have noticed that PyMEL is no longer
>>> distributed with Maya. The new approach is to use pip to install PyMEL
>>> from PyPI, and you can find instructions on how to do this on the PyMEL
>>> PyPI page  (as well as github).
>>>
>>> I know that pip installing is a bit less convenient, but on the bright
>>> side distributing via PyPI will give us the ability to make patch releases
>>> as needed. If access to PyPI is not available in your working environment
>>> due to restricted internet, I highly recommend getting your IT team to set
>>> up an internal mirror that can do pull-through caching, like Nexus
>>>  or Artifactory
>>> , both of which have free
>>> versions.
>>>
>>> On to the release. There are two big improvements in 1.3.0:
>>>
>>>1. support for Maya 2023 and fixes for 2022 in python3 mode
>>>2. very accurate stubs for code completion and static analysis,
>>>distributed as PEP 561 -compliant
>>>pyi files.
>>>
>>> The second feature means if you use an editor that understands pyi
>>> stubs, like PyCharm and VS Code with 

Re: [Maya-Python] 101 teacher

2022-10-12 Thread Juan Moraga
There is a huge leap between *knowing how plugins work in Maya,* as in its
framework and *overcomplicating things*


On Wed, 12 Oct 2022 at 20:28, Pacifique Nzitonda <
nzitondapacifi...@gmail.com> wrote:

> @vince  I agree with you 100%!!!
>
> On Wednesday, October 12, 2022 at 9:21:22 PM UTC+2 vince touache wrote:
>
>> I think there is a misconception of what plugins do, and it looks like
>> many people consider plugin writing as the logical continuity of regular
>> rigging. In day-to-day work, however, writing plugins (and compiling,
>> ingesting them properly in a pipeline, etc...) and rigging assets are as
>> different as modeling and lighting (ok, maybe not that much^^).
>>
>> I prefer, by far, someone who knows how to efficiently rig an asset in an
>> animation-friendly way, than someone who will complexify everything just
>> for the sake of feeling better at tech, forgetting that ultimately, the
>> client is an animator, who doesn't care about the underlying logic.
>> Of course, this is just my opinion, but when I hire people (for a rigging
>> position), I look at the skinning and deformation skills, the clarity of
>> every control, how the puppet behaves, etc... not at whether the person is
>> familiar with MVC, metaclasses, c++ or whatnot.
>>
>> Again, just my opinion, I'm sure it can be different for other people ;)
>>
>> Le mercredi 12 octobre 2022 à 13 h 31 min 46 s UTC-4,
>> nzitonda...@gmail.com a écrit :
>>
>>> thanks Moraga.
>>> Don't get me wrong about thinking that I meant that a "rigging expert"
>>> should ignore how plugins works! I wanted to mention that FOR NOW I want to
>>> focus on what Maya offer as tools and then years later I will write my own
>>> plugins as needed. I want to learn step by step but efficiently.
>>>
>>> On Wednesday, October 12, 2022 at 3:50:16 PM UTC+2 Juan Moraga wrote:
>>>
>>>> I'd say try first to get some of the already mentioned courses by
>>>> either Chris or Chad, I can imagine they have discussions enabled for
>>>> customers where you can interact with them as tutors, but I haven't tried
>>>> them. Or maybe reach them through their websites in case they are open to 1
>>>> to 1 sessions? I can imagine highly experienced people like these don't
>>>> base their 'busisness' on 1 on 1 sessions, as they can produce widely
>>>> available content for everyone with much more benefit in the same time
>>>> frame they teach you, but if I were you I'd definitely try to reach to 
>>>> them.
>>>>
>>>> I don't consider myself expert enough to teach you, but even if I was I
>>>> would first expect you to use the already available resources, as they are
>>>> pretty good i.e. autodesk's documentation, autodesk's examples, online
>>>> tutorials, discussions etc. And if while working on these you get questions
>>>> you can ask here, or google it.
>>>>
>>>> P.D.: I'd expect a self proclaimed expert rigger to know how Maya
>>>> plugins work.
>>>>
>>>> Kind regards,
>>>>
>>>>
>>>> On Wed, 12 Oct 2022, 12:45 Pacifique Nzitonda, 
>>>> wrote:
>>>>
>>>>> Hi Guys, I'm not concerned, at least for now, about writing plugins!
>>>>> As far as I know my goal is not to become an RnD guy but AN EXPERT at 3D
>>>>> rigging.
>>>>> I just need to write utility scripts which I can use in my daily tasks.
>>>>> So I need to know how to write a tool which transfer weights from one
>>>>> deformer to another (Serializing and Deserializing,...),  how to mirror
>>>>> cluster,  deltaMush weights and so on.
>>>>> But all of this need to be done with OpenMaya because It will help me
>>>>> to start learning it.
>>>>> For instance, when I started to write a simple renamer tool using
>>>>> pymel and PySide2  it helped me to start understanding how to mix 
>>>>> maya.cmds
>>>>> and OpenMayaUI so now I want the same approach but for deformers.
>>>>> On Wednesday, October 12, 2022 at 3:24:42 AM UTC+2 a18906...@gmail.com
>>>>> wrote:
>>>>>
>>>>>> But I mean if you really wanna use deformer in a practical way, you
>>>>>> should learn C++, since it always deal with large data, which python wrap
>>>>>> is not ideal.
>>>>>>
>>>>>> On Tue, Oct 11, 2022 at 5:52 PM Zeshi Chen 
>>

Re: [Maya-Python] 101 teacher

2022-10-12 Thread Juan Moraga
I'd say try first to get some of the already mentioned courses by either
Chris or Chad, I can imagine they have discussions enabled for customers
where you can interact with them as tutors, but I haven't tried them. Or
maybe reach them through their websites in case they are open to 1 to 1
sessions? I can imagine highly experienced people like these don't base
their 'busisness' on 1 on 1 sessions, as they can produce widely available
content for everyone with much more benefit in the same time frame they
teach you, but if I were you I'd definitely try to reach to them.

I don't consider myself expert enough to teach you, but even if I was I
would first expect you to use the already available resources, as they are
pretty good i.e. autodesk's documentation, autodesk's examples, online
tutorials, discussions etc. And if while working on these you get questions
you can ask here, or google it.

P.D.: I'd expect a self proclaimed expert rigger to know how Maya plugins
work.

Kind regards,


On Wed, 12 Oct 2022, 12:45 Pacifique Nzitonda, 
wrote:

> Hi Guys, I'm not concerned, at least for now, about writing plugins! As
> far as I know my goal is not to become an RnD guy but AN EXPERT at 3D
> rigging.
> I just need to write utility scripts which I can use in my daily tasks.
> So I need to know how to write a tool which transfer weights from one
> deformer to another (Serializing and Deserializing,...),  how to mirror
> cluster,  deltaMush weights and so on.
> But all of this need to be done with OpenMaya because It will help me to
> start learning it.
> For instance, when I started to write a simple renamer tool using pymel
> and PySide2  it helped me to start understanding how to mix maya.cmds and
> OpenMayaUI so now I want the same approach but for deformers.
> On Wednesday, October 12, 2022 at 3:24:42 AM UTC+2 a18906...@gmail.com
> wrote:
>
>> But I mean if you really wanna use deformer in a practical way, you
>> should learn C++, since it always deal with large data, which python wrap
>> is not ideal.
>>
>> On Tue, Oct 11, 2022 at 5:52 PM Zeshi Chen  wrote:
>>
>>> If you just want to learn about how to write your own deformer, this
>>> tutorial is good enough.
>>>
>>> https://www.cgcircuit.com/tutorial/creating-a-custom-jiggle-deformer
>>>
>>>
>>> On Tue, Oct 11, 2022 at 5:48 PM raul ruiz  wrote:
>>>
 Would be interested in signing up if possible. Would like to learn as
 well.

 On Tue, Oct 11, 2022 at 12:21 PM Pacifique Nzitonda <
 nzitonda...@gmail.com> wrote:

> Hi,
> I'm looking for a "veteran" who can help me to get a good introduction
> at OpenMaya stuff.
> I would like to learn about:
> - deformers (copying weights from deformers to skinCluster, to lattice
> or even from a mesh to nurbSurface for example...)
> - how, really, cluster deformer work
> - matrices
> I'm ready to pay.
> Thanks
>
> --
> You received this message because you are subscribed to the Google
> Groups "Python Programming for Autodesk Maya" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to python_inside_m...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/515bd2ce-c276-44d1-a09d-43207fe0ebcfn%40googlegroups.com
> 
> .
>
 --
 You received this message because you are subscribed to the Google
 Groups "Python Programming for Autodesk Maya" group.
 To unsubscribe from this group and stop receiving emails from it, send
 an email to python_inside_m...@googlegroups.com.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/python_inside_maya/CAPrW%2BZ4%3DGzkaCv36Cfmvt7kzVFLZgRfiAYJtODbae25E_0iDDw%40mail.gmail.com
 
 .

>>> --
> You received this message because you are subscribed to the Google Groups
> "Python Programming for Autodesk Maya" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to python_inside_maya+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/f9f88a4a-a5a7-4080-9d0e-27e89d69376dn%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to python_inside_maya+unsubscr...@googlegroups.com.
To view this discussion on the 

Re: [Maya-Python] Select objects after import

2022-07-31 Thread Juan Moraga
I'd go with Marcus' solution too as it seems a  very clean solution; you
can also try to import the files under a namespace and then query the
objects in that namespace, atho this one is not as neat!

On Sun, 31 Jul 2022, 12:03 Marcus Ottosson,  wrote:

> Unsure whether this’ll work with all file formats, but for native Maya
> files there’s the returnNewNodes argument for cmds.file(), you can pass
> that to cmds.select().
>
>-
>
> https://help.autodesk.com/cloudhelp/2020/ENU/Maya-Tech-Docs/CommandsPython/file.html#flagreturnNewNodes
>
>
> On Sun, 31 Jul 2022 at 11:14, DGFA DAG's GRAPHIC & FOTO ART <
> gerome@gmail.com> wrote:
>
>> Hi,
>>
>> how can I select imported objects and just this that are imported?
>> Whan would import objects such as obj, fbx abc and so on I have the
>> solution, but when importing a maya scene containing some or just one
>> object I do not have any clue how to master it.
>>
>> Do anybody have an advice for me?
>>
>> Thanks
>> D.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Python Programming for Autodesk Maya" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to python_inside_maya+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/python_inside_maya/f04f5e39-35e7-47de-aab5-60ab9bc2b14bn%40googlegroups.com
>> 
>> .
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Python Programming for Autodesk Maya" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to python_inside_maya+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOAwYBJgwaikfydKfZvsHksdanopy7E%2BseSPpX5-OJbucQ%40mail.gmail.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to python_inside_maya+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CA%2BKy2f1qX%2BD2rTc2iG2EsnGznpRXtn9bUZarJyoMS6oOpRktYQ%40mail.gmail.com.


Re: [Maya-Python] V Crypt System

2021-09-13 Thread Juan Moraga
Try using "def onOpenCallBack(*args):" instead.
Callbacks may pass on arguments to you method, which you can use or not.
But you need to allow the function to receive these arguments, otherwise it
will raise an exception.


On Mon, 13 Sep 2021, 15:09 Rudi Hammad,  wrote:

> Hello,
> any idea why this is not working?
> I opened a scene and created this callback, and then saved the scene
>
> def onOpenCallBack():
>print "this is a test"
>
> checkCallback =
> OpenMaya.MSceneMessage.addCheckCallback(OpenMaya.MSceneMessage.kBeforeOpenCheck,
> onOpenCallBack)
>
> Now when I open the scene I get this error:
> # TypeError: onOpenCallBack() takes no arguments (2 given) //
> // Warning: line 0: Python callback failed //
>
> but I didn't give any arguments. Why is it saying given 2? are they *args
> and **kwargs? Still, any idea why this is not working?
> Thanks
>
> El lunes, 6 de septiembre de 2021 a las 22:23:04 UTC+2, Rudi Hammad
> escribió:
>
>> oh, about the screenshots. If the rig is encapsulated in a black box,
>> maybe it would be possible set a callback preventing from unlocking the
>> blackbox?
>> That way you can check want is inside and take screenshot.
>>
>> El lunes, 6 de septiembre de 2021 a las 22:02:29 UTC+2, Rudi Hammad
>> escribió:
>>
>>> Quick question, I haven't use mel in 4 years now so it is probably
>>> something foolish but why is this not working?
>>>
>>> string $toEval = "def foo():import uuid; macAddress = uuid.getnode();
>>> return macAddress; foo()";
>>> string $macAddress = python($toEval);
>>> print $x;
>>>
>>> I would expect $x to print my computer mac address by it is empty.
>>>
>>> El lunes, 6 de septiembre de 2021 a las 15:39:02 UTC+2,
>>> golu...@gmail.com escribió:
>>>
 Marcus, thanks for your comment!

 When I talked about export I meant not to ma or mb, I meant for example
 to alembic or other,  because as I knew alembic export is like a separate
 plugin, and .correct me if I am wrong export to alembic will be ignored by
 this callback.

 I've not understood you, sorry, yes it is already protected, but if
 this protected scene to /myrig.mb will be referenced in the main scene,
 during the main parent scene opening, I will need to decrypt my rig.mb and
 any other child scene which is referenced and send to a remote worker,
 or I understand you wrong)

 About RAM I'm sorry, that's my mistake, later edited the message, but
 was too late, you absolutely right!

 понедельник, 6 сентября 2021 г. в 13:27:48 UTC+3, Marcus Ottosson:

> The part of Maya that does the serialisation to ma and mb - be it via
> export or save - is a singular point of access. The scene callbacks should
> account for all ways in which creating those is possible, including via
> Python and MEL. It wouldn’t account for manual export to other formats, 
> but
> there’s no end to that. Screenshotting your viewport is a format too,
> albeit a lossy one. But I’d argue that depending on what you want to
> protect, if that is rigs and animation, the Maya scene format should be
> enough.
>
>- OpenMaya.MSceneMessage.addCheckCallback()
>
> 
>
> And all of it must be done recursively on the whole data tree in scene
>
> I’d argue not. The information you protect is the information in the
> scene file. If that scene file consists of an absolute path to e.g.
> c:\myassets\myrig.mb then that is *already* protected; nobody can
> access that file but you on your local machine.
>
> so at some point how to handle your RAM memory, because you can’t
> store this encrypted data somewhere…)
>
> I’d argue not (again :)). Is it to protect against hacker-animators
> and hacker-riggers? Or against the general workforce that has no clue 
> about
> callbacks and encryption? If the latter, then saving it into a temp
> directory first, and encrypting it after should suffice. To the user, the
> file would end up where they said it should. But really, it’s a different
> file altogether. Then that file is copied back into a temp directory and
> decrypted whenever they open it. All of that can happen on disk.
>
> And besides, memory is just another location. A motivated-enough
> hacker-animator could access RAM as easily as any location on disk. 
> Doesn’t
> increase the level of protection.
>
> On Mon, 6 Sept 2021 at 11:02, Andrew Golubev 
> wrote:
>
>> It is a very interesting discussion.
>>
>> Yeah, I will agree that it definitely must be invisible - so artists
>> don't even know that encryption happened.
>> But you can't stop on scene saving and loading, you should create
>> lots of workarounds in this "secure Maya client".
>> Somehow 

Re: [Maya-Python] System of References Maya

2021-07-08 Thread Juan Moraga
Hello there,

When you import a reference, maya imports a node of the type "reference",
which has a diamond icon and you will find them by the end of the outliner.
This node is a Reference Node, and thus the RN at the end of its naming. If
you have imported that reference more than once (or you have a node already
with the expected Reference Node name), the following reference nodes will
have a number at the end of them to avoid name collision.

Apart from that, Maya imports the nodes within the referenced maya file,
those will have also a little diamon too.

Maya reference system can be a bit chaotic, specislly when it comes to the
spooky  Reference Edits.

Kind regards,


On Thu, 8 Jul 2021, 01:53 Totally Zen,  wrote:

> how to solve maya's frame of reference is quite confusing?
> some he adds RN, why?
> others he adds numbers, why?
> I see he plays his way, however he wants, because I still can't see what
> standard he uses for that.
>
> I don't know if I explained it very well for you to understand this
> problem with maya renaming
>
> Can someone who understood explain it to me?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Python Programming for Autodesk Maya" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to python_inside_maya+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/21e39fd8-9a89-4f07-b21c-00f82a3a6eb0n%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to python_inside_maya+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CA%2BKy2f3f87UrikKhvO1U50TMcA4BneFzi26B2ZYRA3Ncz%2B6k-w%40mail.gmail.com.


Re: [Maya-Python] A good way to store mesh components in a set ?

2021-06-18 Thread Juan Moraga
/66b60eee-81c2-4ea5-9f77-effe7565d39an%40googlegroups.com?utm_medium=email_source=footer>
>>>> .
>>>>
>>> --
>> You received this message because you are subscribed to the Google Groups
>> "Python Programming for Autodesk Maya" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to python_inside_maya+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/python_inside_maya/5e7dd6e7-ff12-4c8c-b5c2-afee720bn%40googlegroups.com
>> <https://groups.google.com/d/msgid/python_inside_maya/5e7dd6e7-ff12-4c8c-b5c2-afee720bn%40googlegroups.com?utm_medium=email_source=footer>
>> .
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Python Programming for Autodesk Maya" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to python_inside_maya+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOBZ10508id9V4yM9MrePJSRitKqqLefz4XvqFt0y2eVNw%40mail.gmail.com
> <https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOBZ10508id9V4yM9MrePJSRitKqqLefz4XvqFt0y2eVNw%40mail.gmail.com?utm_medium=email_source=footer>
> .
>


-- 
*Juan Moraga*
*Lead Technical Director @ MondoTV*

Portfolio: https://juanmoraga.carbonmade.com/
LInkedin: https://www.linkedin.com/in/juanmoragamartin/
<http://juanmoragaart.tumblr.com/>

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to python_inside_maya+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CA%2BKy2f2B7Ao1gmbdmhi9EpmASmmZ%2B31xX2t7WR%2BzsunDwh-FTg%40mail.gmail.com.


Re: [Maya-Python] Re: News: Additional Manager for Group

2021-06-02 Thread Juan Moraga
Nice! congratulations Mr. Marcus! :D

On Tue, 1 Jun 2021, 21:08 Reza Aarabi,  wrote:

> Well Deserved!
>
> On Tue, Jun 1, 2021 at 1:04 PM Marcus Ottosson 
> wrote:
>
>> Woho! Thanks Justin and everyone. I eat spam for breakfast, so this
>> should fit right in. Yu.
>>
>> Carlos, I clicked your link and $1,000 suddenly appeared under my
>> keyboard! It appears to only have worked once, now it doesn't seem to be a
>> clickable link anymore. How did you do that?! Thanks!
>>
>> On Tue, 1 Jun 2021 at 20:38, Carlos Rico 
>> wrote:
>>
>>> You have win the lottery. Click *here* to claim your price. 
>>>
>>> Great! Thank you both. Thank also to the rest of members helping.
>>> Cheers!
>>>
>>> El mar., 1 jun. 2021 21:01, Jakob Kousholt  escribió:
>>>
 Right on! Here's a high-quality shit post to get you started on your
 new responsibilities, Marcus! xD

 ⣿⣿⣿⠋⣵⣶⣬⣉⡻⠿⠿⢿⣿
 ⣿⣿⣿⠿⠿⠛⣃⣸⣿⣿⣷⣦⢸
 ⣿⣿⢡⣶⣦⣭⣙⠿⣿
 ⡿⠿⠘⣧⢸
 ⣿⣿⣿⠋⣴⣾⣿⣿⣿⡟⠁⠄⠙⠁⠄⠈⣈⠛⢿⣿⣿
 ⣿⣿⣇⢸⣿⣿⣦⣤⣾⣦⣤⣴⣿⣷⡄⢿⣿
 ⣿⠟⣋⣠⣿⣿⣿⢸⣿
 ⢁⣾⣿⡉⠉⠉⠉⣹⣿⣿⣿⣦⠙
 ⣾⣿⣿⣿⣦⣄⣤⣶⣿⣿⣷⣦⣄⣤⣾⣿⣧
 ⠘⢿⣿⣿⠏
 ⣷⣦⣙⠛⠿⢿⣿⣿⡿⠿⠿⠟⢛⣛⣛⡛⠻⠿⠿⠿⠿⠟⢛⣡⣾

 jk! love you all <3



 On Tue, 1 Jun 2021 at 14:58, Kurian O.S  wrote:

> Nice .. thanks to both of you !! .. Marcus it's time to fight with
> spams :)
>
> On Tue, Jun 1, 2021 at 11:53 AM vince touache 
> wrote:
>
>> yy! And I'm also happy that Marcus has accepted =]
>> Thank you both for the priceless work done here!
>>
>> Le mardi 1 juin 2021 à 14:50:59 UTC-4, justin...@gmail.com a écrit :
>>
>>> Hi Everyone!
>>>
>>> I wanted to let you all know that there is now an additional Manager
>>> for this group.
>>> Marcus Ottosson has been a very active and valuable contributor to
>>> the group since Aug 2010. I'm happy to report that Marcus has accepted 
>>> my
>>> request to share the responsibility of approving new members and 
>>> smashing
>>> spam!
>>>
>>> Thank you Marcus!
>>>
>>> Justin
>>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Python Programming for Autodesk Maya" group.
>> To unsubscribe from this group and stop receiving emails from it,
>> send an email to python_inside_maya+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/python_inside_maya/22c47f0d-2217-40cd-9162-f152b8ae24b6n%40googlegroups.com
>> 
>> .
>>
>
>
> --
> --:: Kurian ::--
>
> --
> You received this message because you are subscribed to the Google
> Groups "Python Programming for Autodesk Maya" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to python_inside_maya+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/CANEMyhPhykWtXGhXPdFU-1Zth05KObp0KkMnSG4juvHFfGwmeA%40mail.gmail.com
> 
> .
>
 --
 You received this message because you are subscribed to the Google
 Groups "Python Programming for Autodesk Maya" group.
 To unsubscribe from this group and stop receiving emails from it, send
 an email to python_inside_maya+unsubscr...@googlegroups.com.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/python_inside_maya/CAEKd6ba84vRp7Azt00oHqqkR_qXeUWLP-JgpFhbz%2BoOGExz1%2Bw%40mail.gmail.com
 
 .

>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Python Programming for Autodesk Maya" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to python_inside_maya+unsubscr...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/python_inside_maya/CAFzJ14WVhsgoQ_n7uGgyK_qf%3D84yDi-7sX2cZ6M6KVb%3DmHQ4Sg%40mail.gmail.com
>>> 
>>> .
>>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Python Programming for Autodesk Maya" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to 

Re: [Maya-Python] numpy errors fixed when reintializing maya

2021-05-01 Thread Juan Moraga
I agree on what Marcus said, pip install Numpy is not reliable (from what I
have experienced in the past anyway), at least for Maya 2018.7 (and I can
imagine with MayaPy2.7 in general).

Kind regards!

On Sat, 1 May 2021, 07:40 Marcus Ottosson,  wrote:

> > I can use it with no problem, it is just a rare issue that happens
> sometimes.
>
> Ah, ok. The reason I ask is because this sounds like the kind of problems
> you would get with a version compiled for a different Python. Random,
> subtle, memory related. I would double-check where you got it from, and
> make sure it was actually compiled for your version of Maya.
>
>
> On Fri, 30 Apr 2021 at 23:51, Rudi Hammad  wrote:
>
>> sure, I will.
>> I had a similar issue once at work. Not with numpy but with a unitest
>> when comparing matrices using MMatrix.isEquivalent(). In my computer all
>> the tests passed, so I pushed my code into the servered. But strangly
>> enough,
>> in my colleague computer the same code didn't passed. So we reduce the
>> tolerance argument, and then it passed. Almost like my cpu could handle to
>> compare the float percision but his couldn't.
>> So maybe it is maya messing thing is up depending on how the cpu is
>> feeling that day? I don't know
>>
>> El viernes, 30 de abril de 2021 a las 21:30:19 UTC+2, Alok Gandhi
>> escribió:
>>
>>> And as this is not reliably reproducible, and a restart seems to fix it
>>> for a while, I would not rule out any memory issues. Keep an eye on the
>>> memory next time it happens.
>>>
>>> On Sat, May 1, 2021, 00:04 Marcus Ottosson  wrote:
>>>
 Did you happen to get NumPy from PyPI, via pip install? There was a
 thread here about it not long ago, but the bottom line is if you haven’t
 got a version compiled specifically for your version of Maya, it won’t
 behave.

 On Fri, 30 Apr 2021 at 18:20, Rudi Hammad  wrote:

> I'll let you know when the error happens again, since I don't know how
> to cause it. I think it is something related to can't do what ever with
> None, or something referencing a built-in numpy method.
> I know this doesn't help so when  it happens again, I'll post it.
>
> El viernes, 30 de abril de 2021 a las 17:34:22 UTC+2, Alok Gandhi
> escribió:
>
>> And what are the errors? Any logs?
>>
>>
>> On Fri, Apr 30, 2021 at 8:27 PM Rudi Hammad 
>> wrote:
>>
>>>
>>> Hello,
>>>
>>> has anyone experienced this type of behavior working with numpy? I
>>> know my code is correct because I unitest method and all tests pass. But
>>> from time to time, complety randomly, when i run the unitest I get 17
>>> errors all related to methods that use numpy.
>>> When this happened the first time, I spent hours thinking what was
>>> happening, since I didn't modify anything and no matter how much i 
>>> looked
>>> into it everything looked totally okey.
>>> Then I used the best debuging tool, which is turn off and on again
>>> maya, and it was fixed.
>>>
>>> Since then, I don't waste my time anymore when i get this strange
>>> errors because i know it is not something wrong in my code. And
>>> reinitializing maya fix the issue.
>>> So I wonder if anyone has a similar experience.
>>>
>>> Could it be something related with a presicion that need to be set
>>> somewhere when using numpy? I always set a tolerance aroung 0.001, so I 
>>> am
>>> not taking a risk comparing very small values.
>>>
>>> cheers
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Python Programming for Autodesk Maya" group.
>>> To unsubscribe from this group and stop receiving emails from it,
>>> send an email to python_inside_m...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/python_inside_maya/b7388dc6-daf1-4dd7-b7d3-d3c9a234080bn%40googlegroups.com
>>> 
>>> .
>>>
>> --
> You received this message because you are subscribed to the Google
> Groups "Python Programming for Autodesk Maya" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to python_inside_m...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/bd565466-50c4-491f-88d3-2b1379167e68n%40googlegroups.com
> 
> .
>
 --
 You received this message because you are subscribed to the Google
 Groups "Python Programming for Autodesk Maya" group.
 To unsubscribe from this group and stop receiving emails from it, send
 an 

Re: [Maya-Python] Maya VP2 Rendering engine

2021-04-05 Thread Juan Moraga
Thank you Marcus for sharing your experience :). Indeed I suspect the crash
most likely comes from the source code, which I cannot access as it comes
from an external vendor, so if they cannot solve it, we will probably have
to switch to an OpenGL VP2, where this does not happen, but this leaves the
question... will another crash happen under different circumstances where
no render engine switch can fix it? Time will tell.

At least I'm happy to comfirm with you that for my case (lambert surface
shaders) it doesnt affect DX11 or the OpenGL.

I will keep you guys posted!


Kind regards,

On Mon, 5 Apr 2021, 11:40 Marcus Ottosson,  wrote:

> Not in my experience, but my understanding is that it's meant to for game
> developers whose shaders are written for DirectX. For when you want an
> exact replica of an asset between game engine (rendering with DirectX
> shaders) in Maya. I'd be surprised if you found a performance difference
> between the two, unless you were in fact rendering DirectX shaders. Or on
> the flip side, if you use shaders written for OpenGL as then those wouldn't
> get rendered with DirectX and give you a "performance boost" that way.
>
> I've also toggled back and forth during ambiguous crashes myself but never
> actually gotten any mileage out of it. In my experience, crashes are very
> unlikely due to the actual graphics library and much more likely due to the
> abstraction over it e.g. MDrawManager. In rare cases has a crash vanished
> due to a driver upgrade, which does happen. And if crashes are due to
> drivers, then you'd probably get crashes no matter what graphics library
> you pick. The most likely cause in my case however has been my own code.
> Sigh. xD
>
>
> On Mon, 5 Apr 2021 at 08:01, Juan Moraga 
> wrote:
>
>> Hello all,
>>
>> Have any of you ever experienced any practical advantage using the
>> DirectX 11 engine over any of the other OpenGL engines in the Maya View
>> Port 2.0?
>> It seems to me that it runs faster but it may still be still unestable
>> (Maya 2018.7) as I get it crashing under certain circumstances when OpenGL
>> does not crash.
>>
>> I don't want to dig into why it crashes, I would just want to know what
>> is your take on this topic.
>>
>> Thank you very much in advance!
>>
>> Kind regards,
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Python Programming for Autodesk Maya" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to python_inside_maya+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/python_inside_maya/CA%2BKy2f2ySBgy5ZPsq6Xew24i4muVQUOVCy_FT7ZGcSmYc%2BRCEA%40mail.gmail.com
>> <https://groups.google.com/d/msgid/python_inside_maya/CA%2BKy2f2ySBgy5ZPsq6Xew24i4muVQUOVCy_FT7ZGcSmYc%2BRCEA%40mail.gmail.com?utm_medium=email_source=footer>
>> .
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Python Programming for Autodesk Maya" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to python_inside_maya+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOAreWfgEK4ZsFvsOOp3HRmpHwV5f8K8PEgv9QN0%3DD%3DB_w%40mail.gmail.com
> <https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOAreWfgEK4ZsFvsOOp3HRmpHwV5f8K8PEgv9QN0%3DD%3DB_w%40mail.gmail.com?utm_medium=email_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to python_inside_maya+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CA%2BKy2f0s3ehwhvADZMQWnG%2BwS5t1ZZt5UzEPYmMvAPAVhgYX-g%40mail.gmail.com.


[Maya-Python] Maya VP2 Rendering engine

2021-04-05 Thread Juan Moraga
Hello all,

Have any of you ever experienced any practical advantage using the DirectX
11 engine over any of the other OpenGL engines in the Maya View Port 2.0?
It seems to me that it runs faster but it may still be still unestable
(Maya 2018.7) as I get it crashing under certain circumstances when OpenGL
does not crash.

I don't want to dig into why it crashes, I would just want to know what is
your take on this topic.

Thank you very much in advance!

Kind regards,

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to python_inside_maya+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CA%2BKy2f2ySBgy5ZPsq6Xew24i4muVQUOVCy_FT7ZGcSmYc%2BRCEA%40mail.gmail.com.


Re: [Maya-Python] numpy, pylab, matplotlib inside of Maya

2021-03-31 Thread Juan Moraga
You can see when a topic has bugged us too often when it gets so many
replies in such a short period of time hahaha.
There are some nice people around that compile wheel files and shares them,
I remember succeding instaling OTIO (or maybe it was OCIO or PIL, I can't
remember now) with a wheel from a nice wheel database I found on the secret
corners of the internet, because using the pip install wouldn't work for
mayapy in Maya 2018 (or maybe I was doing sth wrong, who knows now). Also
running py3 in a subprocess inside maya and capturing the output can do the
work too, or having a server in python 3 that listens to a client in maya.
but all these are more convoluted.
A friend of mine used conda to install certain libraries too.

This was my first 2 cents in this nice forum! I'm pleased to meet you guys
;)

On Wed, 31 Mar 2021, 20:05 Todd Widup,  wrote:

> thanks all and yea, I was aware of the issue with Numpy..Ive seena  few
> ppl release version they have compiled for various version, just nothing
> for 2020 or 2022 yet
>
> On Wed, Mar 31, 2021 at 11:09 AM Marcus Ottosson 
> wrote:
>
>> You can totally run NumPy in Maya, albeit compiling it is necessary and
>> not easy. :S
>>
>> Here’s someone doing it for 2018.
>>
>>-
>>
>> http://discourse.techart.online/t/numpy-1-13-1-scipy-0-19-1-for-maya-2018/9121
>>
>> I doubt there’s anything you could build for Python that didn’t also
>> build for Maya. As I understand it, the differences in Maya’s Python are
>> *additions* to the source rather than removals. So if anything you’d be
>> able to compile things with mayapy that you *couldn’t* compile with
>> vanilla Python.
>>
>> On Wed, 31 Mar 2021 at 15:38, Jakob Kousholt  wrote:
>>
>>> That's a fair point! I haven't used pip to install NumPy. I used pip to
>>> install a couple of other libraries which I've had no issues with, so I was
>>> unaware of the issues Marcus and Hannes are pointing to.
>>>
>>> On Wed, 31 Mar 2021 at 10:14, Hannes Delbeke 
>>> wrote:
>>>
 Adding to Marcus his point

 installing from numpy wont work due to compile issues
 however at a previous work place i asked the engineers to compile it
 for the maya specific version and this kept erroring out
 the result: i never managed to get numpy working in maya

 so if people online talk about "just use pip", they likely haven't
 tried it themselves.

 a way to handle this might be run numpy outside of maya and set up a
 bridge between python in maya and python outside of maya



 On Wednesday, 31 March 2021 at 14:04:15 UTC+1 Marcus Ottosson wrote:

> Remember that anything installed via pip that was compiled, like
> numpy, was compiled for a *specific version of Python*; and it wasn’t
> the version of Python in Maya. Not even for Maya 2022.
>
> Instead, you’d get the version coming off of PyPI, which is where pip
> gets its packages. Those have all been built for the vanilla Python off of
> python.org. So you should expect those libraries to either refuse to
> load outright (if you’re lucky), or to load and believe it got loaded into
> vanilla Python when really it’s Maya’s custom build. The result is either
> crashes, memory faults or worse; silent errors. Random errors that occur
> from bad memory being accessed but not always invalid. The kind that are
> next to impossible to debug.
>
> If you do want numpy and other compiled things in Maya without
> worrying about that, if compile it *for* Maya (mayapy). There are
> semi-exceptions though; I used to use PyQt4 off of PyPI for Maya 2014-2015
> for years without issue. Odds are the parts of Python used by that 
> compiled
> library was identical across mayapy and python.org. But there’s no
> way (?) to know up-front!
>
> For anything that *isn’t* compiled however - like six or black - this
> isn’t an issue and all of PyPI is at Maya’s disposal.
>
> If you’d rather not take my word for it, Google about it or search
> this mailing list; it’s a topic that’s been rehashed a number of times 
> over
> the years.
>
> Stay safe!
>
> On Wed, 31 Mar 2021 at 01:45, Jakob Kousholt  wrote:
>
>> Hey Todd,
>>
>>
>> (This will be for maya 2020, and on windows. Let me know if your
>> system is different)
>>
>> So to install pip in in maya you have to download the get-pip.py
>> script from here:
>> https://bootstrap.pypa.io/pip/2.7/get-pip.py
>>
>>
>> The easiest way is to place that in your maya bin directory (Usually
>> located at C:\Program Files\Autodesk\Maya2020\bin).
>> Then cd into that directory within a terminal and run the following
>> command:
>>
>> mayapy.exe get-pip.py
>>
>> After that, you are now able to use pip to install any back you want
>> using this command:
>> (from your bin directory)
>>
>> 

Re: [Maya-Python] Help with Pyinstaller for Mac & Windows. Gaps in knowledge.

2021-01-25 Thread Juan Moraga
hehehehe congratulations! These type of pesky details are always hard to
figure out. Thanks for sharing your answer!

On Mon, 25 Jan 2021, 21:37 Justin Israel,  wrote:

>
>
> On Tue, 26 Jan 2021, 7:26 am Benjam901,  wrote:
>
>> Holy crap I got it...
>>
>> Turns out... windows requires this little addition to the beginning of
>> any fixed filepath in the system in order for drag and drop to work:
>>
>> *file:///*C:/Users/Ben/Music/wildchars/Venda - 1.2 [pământ].wav
>>
>> Which can be easily obtained via: *QUrl.fromLocalFile(file_path)*
>>
>> I will update the other thread with a detailed answer for whomever may be
>> struggling with this in the future too
>>
>
> Nice find!
>
>
>
>> On Friday, 15 January 2021 at 09:37:35 UTC+1 Benjam901 wrote:
>>
>>> I was thinking a little about that avenue of testing but was unsure the
>>> fruitfulness. I will do this with an additional Qt simple window and get
>>> back to you.
>>>
>>> I created a dedicated thread for this topic btw for anyone searching
>>> later to easily find it so I will move our conversation over there:
>>> https://groups.google.com/g/python_inside_maya/c/LABXVlNxZNc
>>>
>>> On Friday, 15 January 2021 at 04:57:36 UTC+1 justin...@gmail.com wrote:
>>>
 Well if you are now setting both url and text mime types, and the
 target is still rejecting the drop, the only other thing I can think of is
 that it is looking at the drop action (copy vs move vs targetmove) and
 still rejected it.
 https://doc.qt.io/qt-5/qt.html#DropAction-enum
 https://doc.qt.io/qt-5/qabstractitemview.html#defaultDropAction-prop

 If you create your own qt window app to accept the drop and print the
 mime, does it work? Is it even your own qt target windows that dont work,
 or just some other windows apps?

 On Fri, Jan 15, 2021 at 10:26 AM Benjam901 
 wrote:

> Hello again,
>
> So after some tinkering I still cannot get windows applications  to
> accept drag mime data from my SqlTableModel. I have tried the following
> with various commented out etc.:
>
>
>
>
>
>
>
> *mime_data =
> QMimeData()mime_data.setUrls(files[0])mime_data.setText(files[0])b =
> bytearray()b.extend(map(ord, files[0]))mime_data.setData('text/plain',
> QByteArray(b))*
>
> Gist of my basic sqltablemodel:
> https://gist.github.com/ben-hearn-sb/61993bf1bf8aa403c6a237d56188667f
>
> Do you see the same behaviour if you implement these mine data types?
>
> // Ben
>

> On Tuesday, 12 January 2021 at 14:37:52 UTC+1 Benjam901 wrote:
>
>> Its not super slow no, a few seconds only, perhaps that just has to
>> be the limitation for the time being...
>>
>> On Tuesday, 12 January 2021 at 10:32:56 UTC+1 justin...@gmail.com
>> wrote:
>>
>>>
>>>
>>> On Tue, 12 Jan 2021, 10:11 pm Benjam901, 
>>> wrote:
>>>
 I will experiment with changing the mime type depending on platform
 and see where that leads me.
>>>
>>>
>>> You can likely set both and the target will choose which mimetype it
>>> wants.
>>>
>>>
 Packaging as a dmg did the trick. Zip for mac OS has always been a
 bit funny.

 Some feedback I got from pyinstaller is the wait time when it
 unpacks to opening time can be a few seconds. With no immediate 
 console or
 logo etc. some users first thought is that it is broken. I dug around 
 and
 it appears --windowed can not be used in conjuction with --console 
 which to
 me strikes a bit odd.

 Do you know if there is a solution?

>>>
>>> I really don't have any ideas. It's been years since I even used
>>> py2app. Is it slow to load on windows? I think a windows exe will need 
>>> to
>>> decompress to a temp before launching whereas the osx app is like a 
>>> folder
>>> already.
>>>
>>> I considered launching the .app/.exe through an intial much smaller
 file that should unpack quicker (hopefully) but that it a HELL of a 
 hack to
 get around it...

 On Monday, 11 January 2021 at 18:57:27 UTC+1 justin...@gmail.com
 wrote:

> On Mon, Jan 11, 2021 at 11:24 PM Benjam901 
> wrote:
>
>> Hello Justin, Thanks for the quick response!
>>
>> My mime data setup looks like this:
>> https://gist.github.com/ben-hearn-sb/038da0d75d6887205e7333147ae9f0d9
>>
>> Windows perhaps needs something other than setUrls for its mime
>> type?
>>
>
> So that implies that your windows drop target isn't accepting
> "text/uri-list" mimetype. Try additionally using setText() so that 
> there is
> a "text/plain" mimetype as well. The text type will likely be the 
> last type
> 

Re: [Maya-Python] Maya Sniffer - Visualise disk usage in your scene files

2021-01-09 Thread Juan Moraga
Thank you Marcus! This is such a great tool! I will test it out on Monday ;)

Have a great rest of your weekend


On Sat, 9 Jan 2021, 12:27 bobrobertuma,  wrote:

> Great program!  Thank you..
>
>
>
> *From:* python_inside_maya@googlegroups.com [mailto:
> python_inside_maya@googlegroups.com] *On Behalf Of *Marcus Ottosson
> *Sent:* Saturday, January 09, 2021 5:18 AM
> *To:* python_inside_maya@googlegroups.com
> *Subject:* [Maya-Python] Maya Sniffer - Visualise disk usage in your
> scene files
>
>
>
> Hi all,
>
> I wrote this little program that I’d like to share; it’s based on years of
> never having any idea of what makes my scene files so large, making it take
> long to open, long to save and puts tears in the eyes of IT doing backups.
>
> · https://github.com/mottosso/maya-sniffer
>
> This should be especially helpful when opening other-peoples-files, and
> even more so when working with references; those bastards can easily dump
> dense meshes into your locally saved file (if you e.g. put a deformer on it
> and mess with history), even though they only really should store deltas
> between an animated scene and original reference.
>
> Enjoy!
>
> Best,
> Marcus
>
> --
> You received this message because you are subscribed to the Google Groups
> "Python Programming for Autodesk Maya" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to python_inside_maya+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOA8JgXqK0sQjT4942MANoun5b32_Q%3DAm7Fxx6rcqQQ0_A%40mail.gmail.com
> 
> .
>
> --
> You received this message because you are subscribed to the Google Groups
> "Python Programming for Autodesk Maya" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to python_inside_maya+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/005501d6e682%24bd36caf0%2437a460d0%24%40gmail.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to python_inside_maya+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CA%2BKy2f1XUsDbXpCDzVjEhkwb5gZ1cxmATajq_pGg39x7jVT9%2BA%40mail.gmail.com.


Re: [Maya-Python] Maya seems to parse info from referenced MayaAscii files into the current scene apparently randomly.

2020-03-16 Thread Juan Moraga
 Hello all of you,

Thank you very much for your insightful answers.
We do have shape edits in the referencing scene, we typically use Shape
Animation Tool to edit some intersections (i.e. a knee going through the
trousers in a highly bent pose), but this wasn't a problem in the past, and
even if it was a problem, it wasn't much of a hassle because files didn't
get too big.
Almost always the referencing file gets way bigger than the addition of all
the referenced files + referencing file, so it is not fully true what I
said at the beginning.

What is really driving me crazy is that whatever triggers the bug it
doesn't do it in a consisten fashion. Many times I replicate what I just
did in the same file and the Maya file won't get really big.
We do work with Redshift Proxies and MASH instances, I don't know how much
of a big problem would this be.

Anyway, I will have a look again with all your nice advices and update you
if there are any news!!

Kind regards and thank you again!

On Fri, 13 Mar 2020 at 17:13, Marcus Ottosson 
wrote:

> Adding to Chad's points, some attributes when edited duplicate the data
> they contain from the referenced scene. When you edit topology for example,
> changes are typically stored in a `tweak` node, to store just the changed
> you've made. That's slim. But edits to e.g. skin weights won't do that. If
> your weights are heavy, e.g. 1,000,000 points, and an edit is made on them,
> then that data would get copied into the referencing scene and bloat the
> size. In some cases, tweak nodes aren't made, in which case the topology is
> duplicated as well.
>
> On Fri, 13 Mar 2020 at 16:23, Chad Fox  wrote:
>
>> Scenes with referenced geometry can increase in size if deformers are
>> added to referenced geometry. Adding a deformer to referenced mesh creates
>> a new local shape with the name suffix "shapeDeformed".
>>
>> The actual referenced shape becomes a pre-deformed intermediate shape.
>> Because Maya cannot rename the reference shape to what you typically might
>> see renamed as "shapeOrig", it instead adds the shapeDeformed name to the
>> new local deformed shape.
>>
>> Because this new shape is a duplicate of the reference, it exists in your
>> scene now and maybe the culprit of your problem.
>>
>> If this is the case there are several things to be aware of when working
>> with shapeDeformed mesh. First, and best practice, is to avoid deforming
>> referenced assets where possible.
>>
>> Second, if you need to work with deformers on reference objects, apply
>> all deformers before end of chain. This will instead keep the visible shape
>> (end of chain) as the reference shape and create local intermediate
>> shapeOrig's instead. This will still increase your file size, but it avoids
>> several problems that can manifest from the visible shape no longer being
>> referenced.
>>
>>
>> It seems likely that this is the cause of your file size increasing.
>> However, it can also depend what is in those reference files. I have seen
>> instances where referencing files with Alembics and VDB files in them
>> caused the creation of thousands of nodes and connections under specific
>> conditions.
>>
>>
>> Take care,
>>
>>
>> Chad Fox
>>
>>
>> On Thu., Mar. 12, 2020, 8:07 a.m. Tim Fowler, 
>> wrote:
>>
>>> .ma files are just text files that you can open with any editor.  Have
>>> you taken a look at what exactly is in there when it gets large?  When
>>> you mention reference edits it sounds like you're still guessing as to
>>> what might be in there.
>>>
>>> On Thu, Mar 12, 2020 at 7:51 AM Juan Moraga 
>>> wrote:
>>> >
>>> >
>>> >
>>> > Hello all,
>>> >
>>> > I usually try to find answers in already created posts, but this has
>>> been giving me a massive headache for a long time now and I don't know how
>>> to look for the answer, so maybe you guys can help me out or point me into
>>> the right direction.
>>> >
>>> > At my animation studio we work with maya ascii files that contain
>>> other referenced maya ascii files.
>>> > So imagine this reference hieachy:
>>> >
>>> > MayaAsciiSceneA.ma (20Mb)
>>> >|
>>> >|___MayaAsciiReferenceA.ma (500Mb)
>>> >|
>>> >|___MayaAsciiReferenceB.ma (250Mb)
>>> >|
>>> >|___MayaAsciiReferenceC.ma (250Mb)
>>> >
>>> > Sometimes when we save MayaAsciiSceneA after working a little bit in
>>> it, we save the file and e

[Maya-Python] Maya seems to parse info from referenced MayaAscii files into the current scene apparently randomly.

2020-03-12 Thread Juan Moraga


Hello all,

I usually try to find answers in already created posts, but this has been 
giving me a massive headache for a long time now and I don't know how to 
look for the answer, so maybe you guys can help me out or point me into the 
right direction.

At my animation studio we work with maya ascii files that contain other 
referenced maya ascii files.
So imagine this reference hieachy:

MayaAsciiSceneA.ma (20Mb)
   |
   |___MayaAsciiReferenceA.ma (500Mb)
   |
   |___MayaAsciiReferenceB.ma (250Mb)
   |
   |___MayaAsciiReferenceC.ma (250Mb)

Sometimes when we save MayaAsciiSceneA after working a little bit in it, we 
save the file and everything looks fine and it weights 20Mb, so no problems.
Some other times instead of doing that, Maya seems to parse the info within 
MayaAsciiReferenceA into MayaAsciiSceneA.ma and it ends up weighting 520Mb.

Our current work around is to remove that reference 
(MayaAsciiReferenceA.ma) and import it again, and it seems to work just 
fine.

I understand that if when working on MayaAsciiSceneA.ma, the artist does 
many reference edits, the file can get heavier, but there is no way they do 
as many reference edits as those.
We do have scripts that automatize loading and unloading references, but 
this has been happening only recently and I don't think our scripts trigger 
this, but it could be the case.

Do you have any idea about why this could be happening or how can I spot 
this?

Right now I have added a callback that checks weights of files before and 
after saving, but again, this only show that this error seems to be random.


Kind regards,

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to python_inside_maya+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/164f1612-3c50-4833-b883-060819bbc185%40googlegroups.com.