Hello, i am trying to remove parent constraint using parentConstraint 
command.

but constraint created by skipping any Tran or Rot attrs 
cmds.parentConstraint(obj1, obj2, rm=True) won't work why ??

am i doing something wrong ??

here is sample code and error:

# Creating two objects
box1 = cmds.polyCube(n="box_01")[0]
box2 = cmds.polyCube(n="box_02")[0]

# Creating parent Constraint only for Translation
cmds.parentConstraint(box1, box2, mo=True, sr=["x","y","z"])

# checking if "box_02" have parent constrint
consObj =  cmds.parentConstraint(box1, q=True, tl=True)

# removing constraint
cmds.parentConstraint(consObj[0], box2, rm=True)

###################################

#Error: RuntimeError: file <maya console> line 1: Cannot edit object with no 
constraint. 

 

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/54026507-c7d7-46d0-a33e-7aba0909347f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to