Hi Subbu -
Unfortunately, the PyNode classes (such as pm.nt.ParentConstraint) do not
contain all of the functionality of the corresponding commands (ie,
pm.parentConstraint or cmds.parentConstraint). In particular, the initial
creation of the underlying MAYA node must often be done with the
Oops... correction below:
On Wed, Apr 20, 2011 at 7:28 AM, Paul Molodowitch elron...@gmail.comwrote:
Hi Subbu -
Unfortunately, the PyNode classes (such as pm.nt.ParentConstraint) do not
contain all of the functionality of the corresponding commands (ie,
pm.parentConstraint or
Not directly related to this thread, but it is related to
parentConstraints
Has anyone noticed that parentConstraint offset rotations are not calculated
correctly for nodes with parents that have negative scale? When the same
thing is attempted, but using an orient constraint instead, the
Personally, I feel like I wouldn't be served well by having the PyNode class
constructor handle node creation. After all, it's the command's job to
create the node and hook it into the DG. I think, if anything, there maybe
could be a class method that does a createNode() and returns a PyNode
Hi All,
Thanks a lot for replies. You saved my time so much for typing.
pCon = PyNode(parentConstraint(cube1, cube2, cube3, mo=1, w=1))
w1 =pCon.getWeightAliasList()[0]
As shown above, and as said by John Patrick, above command is done in one
line and it serves my purpose.
Now I can get drop
Thanks Mr. Paul for the analysis and solutions on this topic ::==))
On Wed, Apr 20, 2011 at 8:32 PM, Subbu Addanki subbu@gmail.com wrote:
Hi All,
Thanks a lot for replies. You saved my time so much for typing.
pCon = PyNode(parentConstraint(cube1, cube2, cube3, mo=1, w=1))
w1
Hey, don't let me rain on your parade!! It sounds like you have a valid
point, given how the constructors are set up currently. And I'll agree, it
does feel a little more satisfying to instantiate the classes directly :P
I think the main downside is that it may be confusing for those new to
I suppose you could have a .createCmd() classmethod instead of the kw args
and leave the current constructor as it is?
I saw this on a PyCon video the other day. It's widely accepted that you
should create multiple constructor methods rather then 1 complicated method
and where possible stick to
Hey,
Has anyone found any other way to parent a scriptJob to a PyQt created
GUI in maya without having to attach a maya created dummy object?
This is what we're doing:
dummyObj = cmds.helpLine(visible=False, width=100,
parent='mainVerticalLayout')
cmds.scriptJob( e=['SelectionChanged',
Could you override the closeEvent in whatever QWidget destroys the UI, and
have it kill the scriptJob instead?
On Wed, Apr 20, 2011 at 10:40 AM, Shawn Patapoff
spatap...@bluecastlegames.com wrote:
Hey,
Has anyone found any other way to parent a scriptJob to a PyQt created
GUI in maya
Hey John,
That's a good idea, I think I'll look into that. Seems way cleaner.
Thanks.
On Wed, Apr 20, 2011 at 11:00 AM, John Patrick jspatr...@gmail.com wrote:
Could you override the closeEvent in whatever QWidget destroys the UI, and
have it kill the scriptJob instead?
On Wed, Apr 20,
One thing I would worry about with that method is what happens in the case
of an exception somewhere in the UI's __init__ after creating the
scriptJob. This is overkill in this case (try/except would probably be just
fine), but I'm a fan of contextManagers for this type of 'i really need to
make
Hey John,
Thanks a bunch for the recipe. Don't 100% understand it, but I'll look over
it a bit more to get a better grasp. Pretty much just hacked it into what I
was doing and all it working great.
Thanks again,
Shawn
On Wed, Apr 20, 2011 at 11:54 AM, John Patrick jspatr...@gmail.com wrote:
I would like to create a triangulated mesh-like object in Maya using
PyMEL.
Which command should I use to create a new polygon object from
scratch?
I have a list of coordinates tuples, with a (x,y,z) tuple for each
point.
I also have a list of index tuples for each triangular face I want to
make,
Hi, I'm trying to translate MEL code to Python to get to it and I have
couple of problems and I'm kind of new to maya programming/scripting
and to these programming languages maybe someone could help me and
tell where are the mistakes and how to solve it. I would be very
grateful, Thanks for
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
16 matches
Mail list logo