Skip to content

Instantly share code, notes, and snippets.

@coxevan
Last active August 29, 2015 14:21

Revisions

  1. coxevan revised this gist May 24, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion skin_cluster_print
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    import pymel.core

    SKIN_CLUSTER_NAME = 'skinCluster1'
    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)
  2. coxevan created this gist May 24, 2015.
    19 changes: 19 additions & 0 deletions skin_cluster_print
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,19 @@
    import pymel.core

    SKIN_CLUSTER_NAME = 'skinCluster1'

    # 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--------'