diff --git a/colorbleed/plugins/fusion/publish/extract_image_sequence.py b/colorbleed/plugins/fusion/publish/extract_image_sequence.py index 272daa4371..55d20cf356 100644 --- a/colorbleed/plugins/fusion/publish/extract_image_sequence.py +++ b/colorbleed/plugins/fusion/publish/extract_image_sequence.py @@ -1,7 +1,7 @@ import pyblish.api -class ExtractImageSequence(pyblish.api.Extractor): +class ExtractImageSequence(pyblish.api.InstancePlugin): """Extract result of saver by starting a comp render This will run the local render of Fusion. @@ -11,9 +11,18 @@ class ExtractImageSequence(pyblish.api.Extractor): order = pyblish.api.ExtractorOrder label = "Render Local" hosts = ["fusion"] - targets = ["renderlocal"] + families = ["colorbleed.saver.renderlocal"] - def process(self, context): + def process(self, instance): + + # This should be a ContextPlugin, but this is a workaround + # for a bug in pyblish to run once for a family: issue #250 + context = instance.context + key = "__hasRun{}".format(self.__class__.__name__) + if context.data.get(key, False): + return + else: + context.data[key] = True current_comp = context.data["currentComp"] start_frame = current_comp.GetAttrs("COMPN_RenderStart")