diff --git a/pype/plugins/maya/publish/collect_ftrack_family.py b/pype/plugins/maya/publish/collect_ftrack_family.py new file mode 100644 index 0000000000..b339f2ef69 --- /dev/null +++ b/pype/plugins/maya/publish/collect_ftrack_family.py @@ -0,0 +1,32 @@ +import pyblish.api + + +class CollectFtrackFamilies(pyblish.api.InstancePlugin): + """Collect model data + + Ensures always only a single frame is extracted (current frame). + + Note: + This is a workaround so that the `pype.model` family can use the + same pointcache extractor implementation as animation and pointcaches. + This always enforces the "current" frame to be published. + + """ + + order = pyblish.api.CollectorOrder + 0.3 + label = 'Add ftrack family' + families = ["model", + "setdress", + "model", + "animation", + "workfile", + "look" + ] + + def process(self, instance): + + # make ftrack publishable + if instance.data.get('families'): + instance.data['families'].append('ftrack') + else: + instance.data['families'] = ['ftrack'] diff --git a/pype/plugins/maya/publish/collect_model.py b/pype/plugins/maya/publish/collect_model.py index 0fe5f29054..b412edf1e9 100644 --- a/pype/plugins/maya/publish/collect_model.py +++ b/pype/plugins/maya/publish/collect_model.py @@ -24,9 +24,3 @@ class CollectModelData(pyblish.api.InstancePlugin): frame = cmds.currentTime(query=True) instance.data['startFrame'] = frame instance.data['endFrame'] = frame - - # make ftrack publishable - if instance.data.get('families'): - instance.data['families'].append('ftrack') - else: - instance.data['families'] = ['ftrack']