mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-02 00:44:52 +01:00
Bigroy's comments and update attribute def label and tip
This commit is contained in:
parent
c8f6fb209b
commit
6e56ba2cc1
2 changed files with 17 additions and 15 deletions
|
|
@ -564,20 +564,20 @@ def get_frame_data(node, asset_data=None, log=None):
|
|||
if log is None:
|
||||
log = self.log
|
||||
|
||||
data = {}
|
||||
|
||||
if node.parm("trange") is None:
|
||||
log.debug(
|
||||
"Node has no 'trange' parameter: {}".format(node.path())
|
||||
)
|
||||
return
|
||||
return data
|
||||
|
||||
if node.evalParm("trange") == 0:
|
||||
log.debug(
|
||||
"Node '{}' has 'Render current frame' set. "
|
||||
"Time range data ignored.".format(node.path())
|
||||
)
|
||||
return
|
||||
|
||||
data = {}
|
||||
return data
|
||||
|
||||
data["frameStartHandle"] = node.evalParm("f1")
|
||||
data["handleStart"] = asset_data.get("handleStart", 0)
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ class CollectRopFrameRange(pyblish.api.InstancePlugin,
|
|||
asset_data = instance.context.data["assetEntity"]["data"]
|
||||
|
||||
attr_values = self.get_attr_values_from_data(instance.data)
|
||||
if attr_values.get("reset_handles"):
|
||||
if not attr_values.get("use_handles"):
|
||||
asset_data["handleStart"] = 0
|
||||
asset_data["handleEnd"] = 0
|
||||
|
||||
|
|
@ -42,17 +42,17 @@ class CollectRopFrameRange(pyblish.api.InstancePlugin,
|
|||
# Log artist friendly message about the collected frame range
|
||||
message = ""
|
||||
|
||||
if attr_values.get("reset_handles"):
|
||||
message += (
|
||||
"Reset frame handles is activated for this instance, "
|
||||
"start and end handles are set to 0.\n"
|
||||
)
|
||||
else:
|
||||
if attr_values.get("use_handles"):
|
||||
message += (
|
||||
"Full Frame range with Handles "
|
||||
"{0[frameStartHandle]} - {0[frameEndHandle]}\n"
|
||||
.format(frame_data)
|
||||
)
|
||||
else:
|
||||
message += (
|
||||
"Use handles is deactivated for this instance, "
|
||||
"start and end handles are set to 0.\n"
|
||||
)
|
||||
|
||||
message += (
|
||||
"Frame range {0[frameStart]} - {0[frameEnd]}"
|
||||
|
|
@ -76,8 +76,10 @@ class CollectRopFrameRange(pyblish.api.InstancePlugin,
|
|||
@classmethod
|
||||
def get_attribute_defs(cls):
|
||||
return [
|
||||
BoolDef("reset_handles",
|
||||
tooltip="Set frame handles to zero",
|
||||
default=False,
|
||||
label="Reset frame handles")
|
||||
BoolDef("use_handles",
|
||||
tooltip="Disable this if you don't want the publisher"
|
||||
" to ignore start and end handles specified in the asset data"
|
||||
" for this publish instance",
|
||||
default=True,
|
||||
label="Use asset handles")
|
||||
]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue