mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 05:14:40 +01:00
pr comments
also renamed start_handle as it is easily confusable with handles
This commit is contained in:
parent
78496be816
commit
a6059afe86
3 changed files with 25 additions and 20 deletions
|
|
@ -233,7 +233,7 @@ class CreateSaver(NewCreator):
|
|||
def _get_frame_range_enum(self):
|
||||
frame_range_options = {
|
||||
"asset_db": "From asset database",
|
||||
"viewer_render_range": "From viewer render in/out",
|
||||
"render_range": "From viewer render in/out",
|
||||
"comp_range": "From composition timeline"
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -20,25 +20,28 @@ class CollectInstanceData(pyblish.api.InstancePlugin):
|
|||
|
||||
# Include creator attributes directly as instance data
|
||||
creator_attributes = instance.data["creator_attributes"]
|
||||
frame_range_source = creator_attributes.get("frame_range_source")
|
||||
instance.data.update(creator_attributes)
|
||||
|
||||
# get asset frame ranges
|
||||
start = context.data["frameStart"]
|
||||
end = context.data["frameEnd"]
|
||||
handle_start = context.data["handleStart"]
|
||||
handle_end = context.data["handleEnd"]
|
||||
start_handle = start - handle_start
|
||||
end_handle = end + handle_end
|
||||
frame_range_source = creator_attributes.get("frame_range_source")
|
||||
instance.data["frame_range_source"] = frame_range_source
|
||||
|
||||
if frame_range_source == "viewer_render_range":
|
||||
if frame_range_source == "asset_db":
|
||||
# get asset frame ranges
|
||||
start = context.data["frameStart"]
|
||||
end = context.data["frameEnd"]
|
||||
handle_start = context.data["handleStart"]
|
||||
handle_end = context.data["handleEnd"]
|
||||
start_with_handle = start - handle_start
|
||||
end_with_handle = end + handle_end
|
||||
|
||||
if frame_range_source == "render_range":
|
||||
# set comp render frame ranges
|
||||
start = context.data["renderFrameStart"]
|
||||
end = context.data["renderFrameEnd"]
|
||||
handle_start = 0
|
||||
handle_end = 0
|
||||
start_handle = start
|
||||
end_handle = end
|
||||
start_with_handle = start
|
||||
end_with_handle = end
|
||||
|
||||
if frame_range_source == "comp_range":
|
||||
comp_start = context.data["compFrameStart"]
|
||||
|
|
@ -50,14 +53,16 @@ class CollectInstanceData(pyblish.api.InstancePlugin):
|
|||
end = render_end
|
||||
handle_start = render_start - comp_start
|
||||
handle_end = comp_end - render_end
|
||||
start_handle = comp_start
|
||||
end_handle = comp_end
|
||||
start_with_handle = comp_start
|
||||
end_with_handle = comp_end
|
||||
|
||||
# Include start and end render frame in label
|
||||
subset = instance.data["subset"]
|
||||
label = "{subset} ({start}-{end})".format(subset=subset,
|
||||
start=int(start),
|
||||
end=int(end))
|
||||
label = "{subset} ({start}-{end})".format(
|
||||
subset=subset,
|
||||
start=int(start),
|
||||
end=int(end)
|
||||
)
|
||||
|
||||
instance.data.update({
|
||||
"label": label,
|
||||
|
|
@ -65,8 +70,8 @@ class CollectInstanceData(pyblish.api.InstancePlugin):
|
|||
# todo: Allow custom frame range per instance
|
||||
"frameStart": start,
|
||||
"frameEnd": end,
|
||||
"frameStartHandle": start_handle,
|
||||
"frameEndHandle": end_handle,
|
||||
"frameStartHandle": start_with_handle,
|
||||
"frameEndHandle": end_with_handle,
|
||||
"handleStart": handle_start,
|
||||
"handleEnd": handle_end,
|
||||
"fps": context.data["fps"],
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ class CollectFusionRender(
|
|||
handleStart=inst.data["handleStart"],
|
||||
handleEnd=inst.data["handleEnd"],
|
||||
ignoreFrameHandleCheck=(
|
||||
not inst.data.get("viewer_render_range")),
|
||||
inst.data["frame_range_source"] == "render_range"),
|
||||
frameStep=1,
|
||||
fps=comp_frame_format_prefs.get("Rate"),
|
||||
app_version=comp.GetApp().Version,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue