Message 1 of 5
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
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.
Solved! Go to Solution.