Hi,

When am trying in Python, Its working as below:
import maya.cmds as cmds
pCon =cmds.parentConstraint('pCube1', 'pCube2', mo=1, w=1)


but in PyMel, Both the following are not working

import pymel.core.nodetypes as nt
pCon =nt.ParentConstraint('pCube1', 'pCube2', mo=1, w=1)
or
pCon =nt.ParentConstraint( PyNode('pCube1'), PyNode('pCube2'), mo=1,
w=1)

"Error: Unable to determine pymel type for 'pCube1' " is coming


In single line it is not possible in PyMel, But its working in 3 lines
like this:
import pymel.core.nodetypes as nt
select ('pCube1', r=1)
select ('pCube2', add=1)
pCon =nt.ParentConstraint(mo=1, w=1)

Any one has any idea, so that I can save 2 lines code in this case,
Constraints are repetitive in my code

Thanks in advance.

Subbu

-- 
http://groups.google.com/group/python_inside_maya

Reply via email to