Esempio n. 1
0
 def picked(s, mesh, ID):
     """ clicked on a mesh """
     try:
         s.drag_joint = None # Clear last joint
         colour.paint(s.cache_all) # Clear canvas
         if mesh: # Did we select anything?
             joint = s.cache_weights[mesh][ID] # Selected joint
             canvas = s.cache_influence[joint]
             s.canvas.paint(canvas, YELLOW)
             s.make_selection(joint) # Select the joint
     except KeyError:
         print "Joint missing from cache."
Esempio n. 2
0
 def drag_highlight(s, obj, face_id):
     """ highlight meshes """
     if obj:
         string_name = om.MFnDagNode(obj).fullPathName()
         node = pmc.PyNode(string_name)  # Convert to pymel again, boo!
         try:
             joint = s.cache_pref[node][face_id]
             influence = s.cache_inf[joint]
             colour.paint(influence, YELLOW)
             pmc.refresh()
         except KeyError as e:
             print "Missing node", e
Esempio n. 3
0
 def activate_rig(s):
     """ turn on our rig """
     if s.making_selection: return
     colour.paint(s.cache_all) # Paint everything grey
Esempio n. 4
0
 def rig_build(s):
     """ build up rig """
     running = True
     for w in s.whitelist:
         colour.paint(w)