mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-26 05:42:15 +01:00
Changed targets for family, changed to instance plugin, added safety to run only onces
This commit is contained in:
parent
5e4ed0a9e4
commit
dcf1de53dc
1 changed files with 12 additions and 3 deletions
|
|
@ -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")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue