botaurus
unread,Apr 15, 2015, 4:04:23 PM4/15/15Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to python_in...@googlegroups.com
I'm wondering if there is a way to essentially put an object in another object's space without parenting them. My rigging components are not parented to each other. I set up the hierarchy relationships with parent constraints. But scale constraints do not constrain their children in their parent's space.
Heres a script of the relationships in a basic form. If you scale the top_sphere, youll notice the bot_sphere does not skew like the mid_sphere. Any help would be much appreciated, thanks! (sorry if this makes no sense)
import maya.cmds as cmds
top_sphere = cmds.polySphere(ch=0)[0]
mid_sphere = cmds.polySphere(ch=0)[0]
cmds.move(5,0,0,mid_sphere)
cmds.rotate(30,0,0,mid_sphere)
mid_sphere_offset = cmds.group(em=1)
#put mid_sphere_offset in top's space with
cmds.parentConstraint(top_sphere, mid_sphere_offset)
cmds.parent(mid_sphere, mid_sphere_offset)
cmds.scaleConstraint(top_sphere, mid_sphere_offset)
bot_sphere = cmds.polySphere(ch=0)[0]
cmds.move(10,0,0,bot_sphere)
cmds.rotate(60,0,0,bot_sphere)
bot_sphere_offset = cmds.group(em=1)
#put bot_sphere_offset in top's space with
cmds.parentConstraint(mid_sphere, bot_sphere_offset)
cmds.parent(bot_sphere, bot_sphere_offset)
cmds.scaleConstraint(mid_sphere, bot_sphere_offset)