diff --git a/openpype/hosts/fusion/plugins/create/create_saver.py b/openpype/hosts/fusion/plugins/create/create_saver.py index d5e77730c8..28917cb27d 100644 --- a/openpype/hosts/fusion/plugins/create/create_saver.py +++ b/openpype/hosts/fusion/plugins/create/create_saver.py @@ -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" } diff --git a/openpype/hosts/fusion/plugins/publish/collect_instances.py b/openpype/hosts/fusion/plugins/publish/collect_instances.py index 59ff52f5b2..98ea0a34e4 100644 --- a/openpype/hosts/fusion/plugins/publish/collect_instances.py +++ b/openpype/hosts/fusion/plugins/publish/collect_instances.py @@ -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"], diff --git a/openpype/hosts/fusion/plugins/publish/collect_render.py b/openpype/hosts/fusion/plugins/publish/collect_render.py index 6956b566ad..dd6d9c2567 100644 --- a/openpype/hosts/fusion/plugins/publish/collect_render.py +++ b/openpype/hosts/fusion/plugins/publish/collect_render.py @@ -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,