Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Fusion: Work with pathmaps #5329

Merged
4 changes: 3 additions & 1 deletion openpype/hosts/fusion/plugins/create/create_saver.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,8 @@ def _configure_saver_tool(self, data, tool, subset):
filepath = self.temp_rendering_path_template.format(
**formatting_data)

tool["Clip"] = os.path.normpath(filepath)
comp = get_current_comp()
tool["Clip"] = comp.ReverseMapPath(os.path.normpath(filepath))

# Rename tool
if tool.Name != subset:
Expand Down Expand Up @@ -246,6 +247,7 @@ def _get_reviewable_bool(self):
label="Review",
)


EmberLightVFX marked this conversation as resolved.
Show resolved Hide resolved
def apply_settings(self, project_settings):
"""Method called on initialization of plugin to apply settings."""

Expand Down
4 changes: 2 additions & 2 deletions openpype/hosts/fusion/plugins/load/load_sequence.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def load(self, context, name, namespace, data):
with comp_lock_and_undo_chunk(comp, "Create Loader"):
args = (-32768, -32768)
tool = comp.AddTool("Loader", *args)
tool["Clip"] = path
tool["Clip"] = comp.ReverseMapPath(path)

# Set global in point to start frame (if in version.data)
start = self._get_start(context["version"], tool)
Expand Down Expand Up @@ -244,7 +244,7 @@ def update(self, container, representation):
"TimeCodeOffset",
),
):
tool["Clip"] = path
tool["Clip"] = comp.ReverseMapPath(path)

# Set the global in to the start frame of the sequence
global_in_changed = loader_shift(tool, start, relative=False)
Expand Down
13 changes: 9 additions & 4 deletions openpype/hosts/fusion/plugins/publish/collect_render.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@

from openpype.pipeline import publish
from openpype.pipeline.publish import RenderInstance
from openpype.hosts.fusion.api.lib import get_frame_path
from openpype.hosts.fusion.api.lib import (
get_frame_path,
get_current_comp,
)
EmberLightVFX marked this conversation as resolved.
Show resolved Hide resolved


@attr.s
Expand Down Expand Up @@ -145,9 +148,11 @@ def get_expected_files(self, render_instance):
start = render_instance.frameStart - render_instance.handleStart
end = render_instance.frameEnd + render_instance.handleEnd

path = (
render_instance.tool["Clip"]
[render_instance.workfileComp.TIME_UNDEFINED]
comp = get_current_comp()
EmberLightVFX marked this conversation as resolved.
Show resolved Hide resolved
path = comp.MapPath(
render_instance.tool["Clip"][
render_instance.workfileComp.TIME_UNDEFINED
]
)
output_dir = os.path.dirname(path)
render_instance.outputDir = output_dir
Expand Down