diff --git a/colorbleed/plugins/maya/publish/collect_animation.py b/colorbleed/plugins/maya/publish/collect_animation.py index 18bab1958a..53251cadc3 100644 --- a/colorbleed/plugins/maya/publish/collect_animation.py +++ b/colorbleed/plugins/maya/publish/collect_animation.py @@ -3,12 +3,12 @@ import pyblish.api import maya.cmds as cmds -class CollectLook(pyblish.api.InstancePlugin): +class CollectAnimationOutputGeometry(pyblish.api.InstancePlugin): """Collect out hierarchy data for instance. Collect all hierarchy nodes which reside in the out_SET of the animation - instance or poitncache instance. This is to unify the logic of retrieving - that specifc data. This eliminates the need to write two separate pieces + instance or point cache instance. This is to unify the logic of retrieving + that specific data. This eliminates the need to write two separate pieces of logic to fetch all hierarchy nodes. Results in a list of nodes from the content of the instances @@ -16,8 +16,8 @@ class CollectLook(pyblish.api.InstancePlugin): """ order = pyblish.api.CollectorOrder + 0.4 - families = ["colorbleed.animation", "colorbleed.pointcache"] - label = "Collect Animation" + families = ["colorbleed.animation"] + label = "Collect Animation Output Geometry" hosts = ["maya"] ignore_type = ["constraints"] @@ -26,15 +26,12 @@ class CollectLook(pyblish.api.InstancePlugin): """Collect the hierarchy nodes""" family = instance.data["family"] - if family == "colorbleed.animation": - out_set = next((i for i in instance.data["setMembers"] if - i.endswith("out_SET")), None) + out_set = next((i for i in instance.data["setMembers"] if + i.endswith("out_SET")), None) - assert out_set, ("Expecting out_SET for instance of family" - "'%s'" % family) - members = cmds.ls(cmds.sets(out_set, query=True), long=True) - else: - members = cmds.ls(instance, long=True) + assert out_set, ("Expecting out_SET for instance of family" + " '%s'" % family) + members = cmds.ls(cmds.sets(out_set, query=True), long=True) # Get all the relatives of the members descendants = cmds.listRelatives(members, @@ -51,7 +48,6 @@ class CollectLook(pyblish.api.InstancePlugin): ignore = set(ignore) hierarchy = [node for node in hierarchy if node not in ignore] - return hierarchy - # Store data in the instance for the validator - instance.data["pointcache_data"] = hierarchy + instance.data["out_hierarchy"] = hierarchy +