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
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
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
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
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
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:
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
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
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
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
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
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
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
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
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
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
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
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
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
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:
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
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:
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
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
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
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
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
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
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
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
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
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
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
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:
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
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
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
) , 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
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
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
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
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
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
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.
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
45 matches
Mail list logo