View Full Version : Way to reposition joints without smooth bind skin updating position?
08-17-2010, 12:25 AM
I'm working with some legacy files and somebody made a rig where the hip joint is sorta at the bottom of the hips rather than about mid way up where they should be bending from.
Does anybody know a way where I can reposition the joints without the smooth bind adjusting the position of weighted geo? I know I could always make a copy and then copy back over the skin weights, but there's a lot of files, and I'd rather not have to go that route if possible.
08-17-2010, 01:53 PM
The [Animation] Skin->Edit Smooth Skin->Move Skinned Joints Tool perhaps?
08-17-2010, 04:57 PM
Oh! Ha! I've never noticed that tool in there before. Thanks.
08-17-2010, 05:53 PM
[EDIT] Never mind. I figured out that I had to select the mesh first so it could find the skin clusters.[EDIT]
Actually, I'm still having troubles with this tool. It seems like it works only sometimes, and I can't figure out why. Even when I have the tool selected, sometimes it's still moving the mesh when I reposition the joints and I have to do things like jump back and forth between it and the move tool, or reset the tool before it seems to start working.
As well, when I try to script the reposition, it appears to be happening like a normal translation on the joint, and takes the skin with it.
Any advice on scripting the reposition?
08-25-2010, 11:14 PM
I do something like this:
import maya.cmds as mc
mesh = mc.ls(sl=True)
#get skincluster from mesh
history = mc.listHistory(mesh)
skinCluster = mc.ls(history,type='skinCluster')
dagPose = mc.dagPose(mesh, query=True, bindPose=True)
for d in dagPose:
#get the joints
joints = mc.skinCluster(skinCluster, query=True, influence=True)
#finally, the actual work. unbind and rebind
mc.skinCluster(skinCluster, edit=True, unbindKeepHistory=True)
mc.skinCluster(joints, mesh, toSelectedBones=True)
Basically, delete the bindposes, unbind keeping history, and then rebind to the same joints.
So I move the joint around, if you don't want to see the mesh move with it, just turn off the skin cluster. Then select the mesh and run this and it snaps back to default.
Hopefully that works, I didn't actually check this exact code...
08-25-2010, 11:14 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2015, Jelsoft Enterprises Ltd.