To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CANuKW52Luo-S-OabmBdxeXdfiCZuJTViV2MTju3pQyO8CXdLaQ%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_m...@googlegroups.com.
For someone who doesn’t generally monkey-patch things, what motivated you to make this library? Could you post a use-case? Looking at your example, how does your library differ from this?
def whoAmI(self):
print("My name is %s" % [self.name](http://self.name/)())
OpenMaya.MFnTransform.whoAmI = whoAmI
On another note, you’ve got a well executed readthedocs page and your docstrings are very well formatted. It’s quite a joy to read.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOBkznpZeHg0pe09fzftXOuWg-JcwshZuUTdstGqdFA%3D8Q%40mail.gmail.com.
Well, I’ve just been repeating the documentation really :)
I read through some of the code and the post about this on your blog and you’re right, I should’ve investigated better prior to asking, sorry about that.
One thing about Banana and monkey-patching the Maya API. I’ve seen a similar reaction to maya.cmds from other persons transitioning from Softimage and I wonder, are you using the API for general scripting such as selecting, and iterating over scene items, or reading from the channelBox etc.? I’ve been writing tools for both Maya and Softimage for quite a few years now and have honestly never found any reason to not stick with maya.cmds for common tasks. I’ve seen some use the API for performance concerns, but other than that it seems better suited for plug-ins and hacking than it does for scripting of general Maya operations, mainly due to lengthy code and the obscured naming convention inherited from C++.
If I had to compare scripting in Softimage versus scripting in Maya, I’d have to go with something like:
What would be your thoughts on this?
--
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/CAFRtmOB1s-FZCcv1HtNV8yoUDm2VN7Liv4x53m74cT528F%3Dnww%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CANuKW50q6Dg2KVNn88NnpufY1OSPxReDgAgRnG1%2B%3DProx7vALQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA0Cz9SyXxYbCSWaWCN8-9ONYQLqoTbyTuN9Pta%3Dxfs3-g%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CANuKW5363nKUj-ExqC%2BRYSTG9yeBPYpKe0zTswiL%2Bjb62jE3oA%40mail.gmail.com.
I’ll reply as objectively as possible … And I don’t understand in what having 409832 flags defined in a same function can be helpful .. I can’t think of how representing nodes with strings can be a robust approach … MEL or its 1:1 port to Python
For reference, here are some things you may wish to leave out of an objective discussion, unless you can provide examples.
When I see some code written in MEL that retrieve some node information by first selecting them, or that hardcore every single name without even thinking that there might be more than one node named ‘root’ in the scene, I’m thinking that many don’t care much about coding practices anyways. .. As such, I’ve never used either MEL or its 1:1 port to Python for anything
In general, I think most solutions are born out of frustration from an existing solution, however I also believe that most frustration are born out of either misunderstanding or misuse of an existing solution. When faced with difficulty, there are two ways one could go - either “I’m doing something wrong” or “the developers of my tool has done it wrong”. It’s a slippery one for sure, but as you’ve chosen the latter and also mention that you’ve barely used maya.cmds I’m slightly suspicious.
Could you try and illustrate your frustration with an example perhaps? Maybe I’m missing something.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA1rMHCiMWRS39YvAWq1q5rUF2W74Q1sxrdT3xOpRGg%2BcA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOAaza5tSTcnpmKyfGSqsMwZyzVJwCERcm8bGPDbkLfO4A%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CANuKW51SA_M8qXXQTgrnKWtSbCyVGiDO2VdK1dJwb3XB5wLYCQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOAd_1C1baXm1mqfG0%3DiWRcZsN2TdayHaG4Nmmzqqikqmg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CANuKW51Ttds1ntra0eHeSsPwuz3nXLN%3DMR7%2BfxX8iee4ogeSNA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOB%2BZK5wYD4uON3DJrteebuvJOMD_NqRPHfJqoEs99i_tA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CANuKW53cDJAwLNXAKOaeF4VPXTry%2BZdw_gxSXbLJNC_bhdSRGg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOC_xL840gUFO%2BYEuEFLKfnoYOFXHoQU1rnNsNesM6ZzOA%40mail.gmail.com.