Last active
August 29, 2015 14:21
-
-
Save coxevan/1485a560a33c527eaab3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pymel.core | |
SKIN_CLUSTER_NAME = 'skinCluster1' # <-- Replace with 'name_of_my_skincluster' but keep the quotes! | |
# Get the skin cluster from the shape node | |
skin_cluster = pymel.core.PyNode(SKIN_CLUSTER_NAME) | |
# Get the objects associated with that skincluster (mostly bones) | |
influence_list = skin_cluster.influenceObjects() | |
# Print that to the display and the script editor | |
print_string = 'Objects (bones) associated with {0} : {1}'.format( skin_cluster.name(), len( influence_list ) ) | |
pymel.core.headsUpMessage( print_string ) | |
print print_string | |
bone_list_string = '\nBones Associated : START-------- \n ' | |
for bone in influence_list: | |
bone_list_string = bone_list_string + bone + '\n' | |
print bone_list_string + '\nBone Associated : END--------' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Replace skinCluster1 within the quotes with whatever the name of your skin cluster is. You can easily find that in the channel box with the mesh selected. It should be skinCluster1 by default, so unless you changed it, this script should be good to run out of the box.