mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 05:14:40 +01:00
Merged in 2.0/bugfix/PYPE-326-nk-manager-handles (pull request #142)
2.0/bugfix/PYPE-326 nk manager handles
This commit is contained in:
commit
61618dd5fc
4 changed files with 10 additions and 3 deletions
|
|
@ -17,6 +17,10 @@ class CollectNukeInstances(pyblish.api.ContextPlugin):
|
|||
def process(self, context):
|
||||
asset_data = io.find_one({"type": "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"]))
|
||||
instances = []
|
||||
# creating instances per write node
|
||||
|
|
@ -51,7 +55,6 @@ class CollectNukeInstances(pyblish.api.ContextPlugin):
|
|||
"family": avalon_knob_data["family"],
|
||||
"avalonKnob": avalon_knob_data,
|
||||
"publish": node.knob('publish').value(),
|
||||
"handles": int(asset_data["data"].get("handles", 0)),
|
||||
"step": 1,
|
||||
"fps": int(nuke.root()['fps'].value())
|
||||
|
||||
|
|
|
|||
|
|
@ -35,10 +35,12 @@ class CollectNukeWrites(pyblish.api.ContextPlugin):
|
|||
output_type = "mov"
|
||||
|
||||
# Get frame range
|
||||
handles = instance.context.data.get('handles', 0)
|
||||
first_frame = int(nuke.root()["first_frame"].getValue())
|
||||
last_frame = int(nuke.root()["last_frame"].getValue())
|
||||
|
||||
if node["use_limit"].getValue():
|
||||
handles = 0
|
||||
first_frame = int(node["first"].getValue())
|
||||
last_frame = int(node["last"].getValue())
|
||||
|
||||
|
|
@ -76,6 +78,7 @@ class CollectNukeWrites(pyblish.api.ContextPlugin):
|
|||
"outputDir": output_dir,
|
||||
"ext": ext,
|
||||
"label": label,
|
||||
"handles": handles,
|
||||
"startFrame": first_frame,
|
||||
"endFrame": last_frame,
|
||||
"outputType": output_type,
|
||||
|
|
|
|||
|
|
@ -21,11 +21,12 @@ class IncrementScriptVersion(pyblish.api.ContextPlugin):
|
|||
prerender_check = list()
|
||||
families_check = list()
|
||||
for instance in instances:
|
||||
if ("prerender" in str(instance)):
|
||||
if ("prerender" in str(instance)) and instance.data.get("families", None):
|
||||
prerender_check.append(instance)
|
||||
if instance.data.get("families", None):
|
||||
families_check.append(True)
|
||||
|
||||
|
||||
if len(prerender_check) != len(families_check):
|
||||
from pype.lib import version_up
|
||||
path = context.data["currentFile"]
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ class ValidateScript(pyblish.api.InstancePlugin):
|
|||
]
|
||||
|
||||
# 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 = []
|
||||
asset_attributes = {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue