def cache(s, geos): """ Cache some meshes for use """ s.geos = geos = dict((a, has.skin(a)) for a in geos) # Get skins s.cache_influence, s.cache_pref = cache.preferred_joint_and_influence() s.cache_all = ",".join("%s.vtx[0:]" % a for a in geos) # Everything!
def refresh_whitelist(s): """ Collect data from the scene """ selection = pmc.ls(RIG_NAME, r=True, type="objectSet") s.whitelist = filtered_selection = set(c for a in selection for b in a for c in b.getShapes()) s.cache_inf, s.cache_pref = cache.preferred_joint_and_influence(filtered_selection) s.cache_skele = skeleton.Bones(s.cache_inf)