mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
feat(nuke): fixing handles for publishing writes
This commit is contained in:
parent
65be5efb5c
commit
346c824f72
3 changed files with 8 additions and 2 deletions
|
|
@ -17,6 +17,10 @@ class CollectNukeInstances(pyblish.api.ContextPlugin):
|
||||||
def process(self, context):
|
def process(self, context):
|
||||||
asset_data = io.find_one({"type": "asset",
|
asset_data = io.find_one({"type": "asset",
|
||||||
"name": api.Session["AVALON_ASSET"]})
|
"name": api.Session["AVALON_ASSET"]})
|
||||||
|
|
||||||
|
# add handles into context
|
||||||
|
context.data['handles'] = int(asset_data["data"].get("handles", 0))
|
||||||
|
|
||||||
self.log.debug("asset_data: {}".format(asset_data["data"]))
|
self.log.debug("asset_data: {}".format(asset_data["data"]))
|
||||||
instances = []
|
instances = []
|
||||||
# creating instances per write node
|
# creating instances per write node
|
||||||
|
|
@ -51,7 +55,6 @@ class CollectNukeInstances(pyblish.api.ContextPlugin):
|
||||||
"family": avalon_knob_data["family"],
|
"family": avalon_knob_data["family"],
|
||||||
"avalonKnob": avalon_knob_data,
|
"avalonKnob": avalon_knob_data,
|
||||||
"publish": node.knob('publish').value(),
|
"publish": node.knob('publish').value(),
|
||||||
"handles": int(asset_data["data"].get("handles", 0)),
|
|
||||||
"step": 1,
|
"step": 1,
|
||||||
"fps": int(nuke.root()['fps'].value())
|
"fps": int(nuke.root()['fps'].value())
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -35,10 +35,12 @@ class CollectNukeWrites(pyblish.api.ContextPlugin):
|
||||||
output_type = "mov"
|
output_type = "mov"
|
||||||
|
|
||||||
# Get frame range
|
# Get frame range
|
||||||
|
handles = instance.context.data.get('handles', 0)
|
||||||
first_frame = int(nuke.root()["first_frame"].getValue())
|
first_frame = int(nuke.root()["first_frame"].getValue())
|
||||||
last_frame = int(nuke.root()["last_frame"].getValue())
|
last_frame = int(nuke.root()["last_frame"].getValue())
|
||||||
|
|
||||||
if node["use_limit"].getValue():
|
if node["use_limit"].getValue():
|
||||||
|
handles = 0
|
||||||
first_frame = int(node["first"].getValue())
|
first_frame = int(node["first"].getValue())
|
||||||
last_frame = int(node["last"].getValue())
|
last_frame = int(node["last"].getValue())
|
||||||
|
|
||||||
|
|
@ -76,6 +78,7 @@ class CollectNukeWrites(pyblish.api.ContextPlugin):
|
||||||
"outputDir": output_dir,
|
"outputDir": output_dir,
|
||||||
"ext": ext,
|
"ext": ext,
|
||||||
"label": label,
|
"label": label,
|
||||||
|
"handles": handles,
|
||||||
"startFrame": first_frame,
|
"startFrame": first_frame,
|
||||||
"endFrame": last_frame,
|
"endFrame": last_frame,
|
||||||
"outputType": output_type,
|
"outputType": output_type,
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ class ValidateScript(pyblish.api.InstancePlugin):
|
||||||
]
|
]
|
||||||
|
|
||||||
# Value of these attributes can be found on parents
|
# Value of these attributes can be found on parents
|
||||||
hierarchical_attributes = ["fps", "resolution_width", "resolution_height", "pixel_aspect"]
|
hierarchical_attributes = ["fps", "resolution_width", "resolution_height", "pixel_aspect", "handles"]
|
||||||
|
|
||||||
missing_attributes = []
|
missing_attributes = []
|
||||||
asset_attributes = {}
|
asset_attributes = {}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue