[Maya-Python] Re: optionVar of python ???

2014-02-03 Thread Count Zer0
PyMel gives you easy access to them too: http://download.autodesk.com/global/docs/maya2013/en_us/PyMel/generated/classes/pymel.core.language/pymel.core.language.OptionVarDict.html And you should be using PyMel anyway if you're moving past MEL anyway. -jason On Monday, February 3, 2014 9:21:44

[Maya-Python] Re: OpenMaya accessing shape node after creation

2013-12-23 Thread Count Zer0
PyMEL just wraps the maya.cmds.addAttr() as Jeremy mentions, which by default does not return anything. You'll have to recast to an Attribute class manually like this: myNode.addAttr('test') myAttr = myNode.test It's possible to hack pymel.core.general.addAttr() if you want to return the

Re: [Maya-Python] Re: OpenMaya accessing shape node after creation

2013-12-20 Thread Count Zer0
PyMEL is all OOP. Every maya node type is wrapped by a class and has all maya.cmds relevant to that object attached as methods to it. You can even create custom sub-classes that inherit all methods and attach your own. We use it for 99.9% of our tools. It only slows down a lot when iterating

Re: [Maya-Python] OpenMaya accessing shape node after creation

2013-12-18 Thread Count Zer0
That's why everybody uses maya.cmds and/or pymel. On Wednesday, December 18, 2013 2:34:54 PM UTC-8, Eric Thivierge wrote: Yeah I am in line 13. Just seems an insane amount of code just to get at the shape node. Eric Thivierge

Re: [Maya-Python] Getting the qt designer working with Pyside Maya 2014

2013-10-01 Thread Count Zer0
You need to finally draw your window: Add something like this: def run(): if pymel.core.window( 'myTool_window', q = 1, ex = 1 ): pymel.core.deleteUI( 'myTool_window' ) tool = ListExample() tool.show() run() http://www.jason-parks.com/artoftech/?p=439

[Maya-Python] Re: Intro to PyMEL training video

2013-06-13 Thread Count Zer0
On Wednesday, June 12, 2013 11:43:01 AM UTC-7, Geordie Martinez wrote: Hey all, This is the place where people come to ask questions about PyMEL so I figured it would be a good place to post this as a resource (and shamelessly self-promote) for those wishing to learn PyMEL:

[Maya-Python] Re: PyMel Custom Transform Node

2013-05-30 Thread Count Zer0
Yep. Sounds like a custom node would be better for you then subclassing a PyMel transform node. -- 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

[Maya-Python] Re: PyMel Custom Transform Node

2013-05-25 Thread Count Zer0
That is really about PyMEL subclassing. You can subclass just about any Maya leaf node (bottom of the inheritance hierarchy). The fact that it was a transform node, was purely coincidental. It sounds like you want to do something more like a constraint between two nodes. Are you interested in

[Maya-Python] perforce for maya 2014 (2.7.3)

2013-05-17 Thread Count Zer0
Anybody got a P4.PY, P4API.pyd build that imports into Maya 2014? -- 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] inheriting pymel.core.nodetypes.Transform class

2013-03-26 Thread Count Zer0
Long answer, I know, but I mentioned it was kind of tricky. I hope you got it to work. Let me know if you have any questions. -jason aka:'Count 0' On Tuesday, March 26, 2013 5:08:58 AM UTC-7, simon payne wrote: Brilliant thanks :-) On Thursday, March 21, 2013 8:04:10 AM UTC-7, Count Zer0

Re: [Maya-Python] inheriting pymel.core.nodetypes.Transform class

2013-03-21 Thread Count Zer0
OK. Got the full answer done. Check it out here: http://www.jason-parks.com/artoftech/?p=520 Hope this helps. -jason On Tuesday, March 12, 2013 1:35:08 PM UTC-7, Count Zer0 wrote: On Tuesday, March 12, 2013 5:22:55 AM UTC-7, simon payne wrote: Does anyone know if it is possible to inherit

Re: [Maya-Python] inheriting pymel.core.nodetypes.Transform class

2013-03-12 Thread Count Zer0
On Tuesday, March 12, 2013 5:22:55 AM UTC-7, simon payne wrote: Does anyone know if it is possible to inherit the pymel Transform class ? myObj = pymel.core.nodetypes.Transform('pCube1') myObj.getTranslation() # Result: dt.Vector([0.0, 0.0, 0.0]) # sousing the class Transform is

[Maya-Python] Re: Maya Python OOP examples

2013-02-04 Thread Count Zer0
Chad makes good use of classes as data containers for exporting here: http://www.chadvernon.com/blog/resources/maya-tools/cvxporter/ On Sunday, February 3, 2013 4:26:30 AM UTC-8, Christopher wrote: Anyone know of any open-source Maya tools that are good examples of OOP? Nothing as complex as

[Maya-Python] Re: Autocomplete for arguments in Python

2013-01-08 Thread Count Zer0
On Tuesday, January 8, 2013 11:22:38 AM UTC-8, Boban Joksimoski wrote: Hi, i installed eclipse and wing IDE and I was trying to get autocomplete for arguments in functions (e.g. when I type cmds.ls() i want the documentation in wingide to show all the argiments in source assistant). I made

[Maya-Python] Re: Pymel silent initialization

2012-12-07 Thread Count Zer0
That's all Mental Ray plugin bootup. I hate that crap clogging my scene/output all the time. Turn of the Mayatomr.bundle and uncheck auto-load. That should propagate to headless launching as well. -jason On Thursday, December 6, 2012 1:35:47 PM UTC-8, Murphy Randle wrote: Hi there! I'm

[Maya-Python] Re: PyMel Type Workflow

2012-09-21 Thread Count Zer0
You can evaluate WingIDE pro for a month which has remote debugging option. If you work at it, you can get Eclipse/Pydev to remote debug to Maya. It's been awhile since I've got it working. I have a post on it here: http://www.jason-parks.com/artoftech/?p=41 But that was year's ago and may take

[Maya-Python] Re: PyMel Type Workflow

2012-09-20 Thread Count Zer0
Transform.name() is a convenience method which just returns the value of the Transform._name attribute which probably gets set upon instantiation of the Transform class. Put some of this code in a script, set a breakpoint on it in WingIDE and step through the creation of the node and then the

[Maya-Python] Re: eclipse + pydev + maya 2011 , pydevd.settrace(suspend=false) freezes maya ?

2012-04-29 Thread Count Zer0
yay! enjoy. On Saturday, April 28, 2012 9:50:47 PM UTC-7, oglop wrote: all right , now it's working , i changed to another listening port . now it's working fine. On Saturday, April 28, 2012 4:56:51 PM UTC+8, oglop wrote: i followed these two tutorials and and to do remote debugging in

[Maya-Python] Re: PyMEL tools.loggingControl

2011-12-13 Thread Count Zer0
loggingControl menu is rarely used, can anybody confirm it works for them in latest 2012 w/ latest pymel? Thanks, -jason On Dec 8, 4:48 pm, Geordie Martinez geordiemarti...@gmail.com wrote: if you get the latest from the gitHub it fixes the issue. On Thu, Dec 8, 2011 at 4:38 PM, Count Zer0 count

[Maya-Python] PyMEL tools.loggingControl

2011-12-08 Thread Count Zer0
Looks like this may be broken again in 2012, or possible an OSX issue. I get this when I open the menu: # Error: CallbackError: file /Applications/Autodesk/maya2012/Maya.app/ Contents/Frameworks/Python.framework/Versions/Current/lib/python2.6/ site-packages/pymel/internal/factories.py line 744:

[Maya-Python] Re: how to change this mel code to python?HELP

2011-07-24 Thread Count Zer0
Sounds like you may have a bad PyMEL install. Can you 'point' to the one in your Autodesk install dir? Import that one? or you can download 1.0.3 from google code and put it somewhere else and add that path to your pythonpath and import that one. The latest 1.0.3 should have a working mel2pyStr

[Maya-Python] Re: Which editor do you use?

2011-07-10 Thread Count Zer0
Don't forget Christian's Super-post re: everything Eclipse: http://www.christianakesson.com/blog/?p=111 On Jul 10, 9:26 am, John Patrick jspatr...@gmail.com wrote: FYI, for those looking for a tutorial on setting up Eclipse with pydev and maya autocompletion, check out the PyMel docs:

[Maya-Python] Re: Power of Python talk with Jason Parks tonight (rigging dojo live)

2011-06-26 Thread Count Zer0
Hope it helps. Lemme know if you have questions on the theory or setup. -jason On Jun 23, 10:25 am, na arthur younte...@gmail.com wrote: This is awesome... Thank you very much for sharing this with us. 2011/6/20 Jakob Welner jakob.wel...@gmail.com For those of you who didn't see it

[Maya-Python] Re: PyMel: ParentConstraint

2011-04-21 Thread Count Zer0
overwrite things (even though it's perfectly safe if you're more careful). On Wed, Apr 20, 2011 at 10:44 PM, Count Zer0 count@gmail.com wrote: That being said, maybe there's a situation where using the PyNode constructor like a command would be convenient, I just haven't run

[Maya-Python] Re: PyMel: ParentConstraint

2011-04-20 Thread Count Zer0
That being said, maybe there's a situation where using the PyNode constructor like a command would be convenient, I just haven't run into one :) Nah man, You definitely want to create all objects with PyMEL classes, that way you get an instance object and method completion in your Script

[Maya-Python] Re: is there a pyMel or python solution akin to the mel script findRelatedSkinCluster

2011-02-05 Thread Count Zer0
PyMEL's listHistory method works well: PyNode('myMesh').listHistory(type=skinCluster) -jason On Feb 3, 4:31 pm, stephenkmann stephenkm...@gmail.com wrote: I'm barely starting to dip my toes into python, but I thought I'd throw this out there. you might be able to get what you want using the

[Maya-Python] Re: Subprocess, Maya 2011, and external python2.5 scripts ...

2011-01-23 Thread Count Zer0
Why won't your code work in 2.6? 2.5 should be pretty forward compatible. Can't you update the little bit of incompatible code. Just importing 'os' shouldn't error. That is pretty much the same for both versions. Just seems like a real pain to get a 2.5 interpreter to run in a subprocess inside

[Maya-Python] Re: Maya remote debugging in Eclipse with Windows XP

2011-01-10 Thread Count Zer0
Bob, Any luck following these instructions? Art of Tech - Remote Maya Python Debugging in Eclipse http://bit.ly/cVHNs3 -jason On Jan 4, 9:44 am, Bob N. rn216...@gmail.com wrote: hi, I am kind of confused. I think I got autocompletion to work, and now my goal is to be able to debug a script

[Maya-Python] Re: Maya 2011 PyQt4 import error

2011-01-06 Thread Count Zer0
Probably a load order issue. I think PyQt4 path needs to be established pretty early in the maya boot process, we have ours in our Maya.env. Detailed thread on Maya boot order and injecting paths early enough here: http://bit.ly/dKdGYh Let us know. On Jan 6, 9:36 am, Judah Baron

[Maya-Python] multiple inheritance instanciation

2010-12-22 Thread Count Zer0
Anybody still here for the holidays? Wondering if any Python gurus can explain why super works like this: class A(object): def __init__(self): print 'A instantiated' self.important = 'a' class B(object): def __init__(self): print

[Maya-Python] Re: Debugging Maya in WingIDE

2010-12-04 Thread Count Zer0
I seem to recall that happening to me awhile back. I asked the Wing guys to help and they suggested using this code to connect: import wingdbstub if wingdbstub.debugger != None: wingdbstub.debugger.StartDebug(autoquit=False); print 'Connected to wingIDE' else: print 'Could NOT

[Maya-Python] Re: PyMEL AbstractBase Classes

2010-11-24 Thread Count Zer0
OK, So really the only usage for using the actual class command w/ the first capital letter for these Abstract Base Classes is to cast an already existing node into the pymel object. But, some classes can create the node from scratch like: jnt = pm.nt.Joint(n='root') Option1 (I like doing

[Maya-Python] PyMEL AbstractBase Classes

2010-11-23 Thread Count Zer0
Anybody know how to use a class like the RebuildSurface class: http://www.luma-pictures.com/tools/pymel/docs/1.0/generated/classes/pymel.core.nodetypes/pymel.core.nodetypes.RebuildSurface.html How would you pass in the surface you wanted to run one of these methods on? or does the object have to

[Maya-Python] PyMEL tools.loggingControl

2010-11-03 Thread Count Zer0
Anybody get loggingControl.py to work? I tried: from pymel.tools import loggingControl reload(loggingControl) loggingControl.initMenu() But clicking the new 'Logging Control' menu in Maya yields: # Error: refreshLoggingMenu() takes exactly 1 argument (3 given) # TypeError:

[Maya-Python] Re: PyMEL tools.loggingControl

2010-11-03 Thread Count Zer0
Answer is to change line 113 to accept extra args: def refresh(self, *args): Thanks Seth! On Nov 3, 10:47 am, Count Zer0 count@gmail.com wrote: Anybody get loggingControl.py to work? I tried: from pymel.tools import loggingControl reload(loggingControl) loggingControl.initMenu

[Maya-Python] Re: maya.cmds vs pymel speed?

2010-10-02 Thread Count Zer0
Well put Ofer. IMHO, the speed of coding in PyMEL FAR outweighs the lack of speed in script execution. 99% of the time, script execution speed is near instantaneous, so PyMEL is the proper thing to use. When you get into lots of mesh iteration and weights stuff, you might want to go back to

[Maya-Python] Re: From MEL to API

2010-04-18 Thread Count Zer0
wannAPI, Sure. PyMel is a great learning tool for accessing Maya API. Though Maya Python and PyMel are kind of the same thing. PyMel is just a bajillion convenience functions wrapped around the sucky Maya Python implementation, lots of 'em making API calls a lot easier. You may also want to try

[Maya-Python] Re: PyMEL 1.0.0 Beta

2010-02-05 Thread Count Zer0
) , but you're gonna have to ditch the 0.7 branch.   if you're using 0.9.3 and 1.0 then you can just do: from pymel.all import * both versions provide a converter that will change all imports of pymel to pymel.all. -chad On Feb 4, 2010, at 10:45 AM, Count Zer0 wrote: Is there a better way

[Maya-Python] Re: PyMEL 1.0.0 Beta

2010-02-05 Thread Count Zer0
in python 2.6. -chad On Jan 20, 2010, at 10:34 PM, Count Zer0 wrote: Posting for Drew Skillman of DoubleFine from tech-artists.org   forum: We're running into some trouble with the new deployment   scheme for 1.0. Specifically, pymel now needs to be imported prior to the   maya

Re: [Maya-Python] Re: PyMEL 1.0.0 Beta

2010-02-05 Thread Count Zer0
happens in the script editor it is being executed too late in the process to make a different. Ian On Fri, Feb 5, 2010 at 1:24 PM, Count Zer0 count@gmail.com wrote: Manual Method 4: sitecustomize ... 4. save this file as sitecustomize.py somewhere in your system python path

[Maya-Python] Re: PyMEL 1.0.0 Beta

2010-02-05 Thread Count Zer0
log into their machines. That way we can maintain the script and artists machines apply the changes. Ian On Fri, Feb 5, 2010 at 4:38 PM, Count Zer0 count@gmail.com wrote: I agree Ian, Are you hand-setting PYTHONPATH in all of your user's system environment variables (via windows

[Maya-Python] Re: PyMEL 1.0.0 Beta

2010-02-04 Thread Count Zer0
Is there a better way to have multiple versions of pymel (.7 1.0) installed and not have this at the top of every one of my scripts: import maya.mel as mm ver = mm.eval(getApplicationVersionAsFloat) if ver = 2008: from pymel.core import * else: from pymel import * We'll have multiple teams

[Maya-Python] Re: PyMEL 1.0.0 Beta

2010-01-20 Thread Count Zer0
Posting for Drew Skillman of DoubleFine from tech-artists.org forum: We're running into some trouble with the new deployment scheme for 1.0. Specifically, pymel now needs to be imported prior to the maya libs, which means it needs to appear before those maya libs in sys.path. This is actually

[Maya-Python] 0_7_compatibility_mode=on

2009-07-22 Thread Count Zer0
Anybody confirm this works? I'm not getting this feature to work. I've got 'node.attribute.exists()' coded all over the place which is not supported in 0.9.1. Guess I can replace w/ node.hasAttr ('attribute') but that's gonna take awhile. Would like to have this transition switch working.

[Maya-Python Club:1509] Re: Osipa Enterainment releases free stuff!

2009-01-31 Thread Count Zer0
Thank you sir! I love uMen and am reading up on your documentation tagging. Looking forward to using the autoWikis too. I'll post more questions here if I have any. -jason On Jan 30, 8:14 pm, jasonosipa jason.os...@gmail.com wrote: Hi, all!  I'm trying to get the word out on this, so I