PDA

View Full Version : select bind mesh from joint?


Dennik
08-08-2012, 03:46 AM
How could I find which mesh object is bind to the selected joint?
I tried to use the listConnections command to no luck. But I'm probably too tired to figure it out.
Please help.

djx
08-08-2012, 10:16 AM
For a smooth bind you could select some joints and do something like this:
import pymel.core as pm
joints = pm.selected(type='joint')
for j in joints:
skinClusters = j.worldMatrix[0].connections(type='skinCluster')
for s in skinClusters:
geo = s.getGeometry()[0]
print '%s influences %s via %s'%(j,geo,s)

David

Dennik
08-08-2012, 06:46 PM
Thanks for responding David.
I'm not familiar with Pymel. Any chance this could apply to Mel?

djx
08-08-2012, 11:43 PM
Yeah, just use listConnections on the worldMatrix[0] attribute to find the skinCluster, then use the skinCluster command to find the geometry.

David

CGTalk Moderation
08-08-2012, 11:43 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.