From b86febf0ed8f83f70fd6334fbecebd367fb53607 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20David?= Date: Tue, 6 Dec 2022 10:56:43 +0100 Subject: [PATCH] Fix: Published workfile relative paths are not correctly remapped --- openpype/hosts/blender/plugins/publish/extract_blend.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/openpype/hosts/blender/plugins/publish/extract_blend.py b/openpype/hosts/blender/plugins/publish/extract_blend.py index cd5893aecab..2ac31064a58 100644 --- a/openpype/hosts/blender/plugins/publish/extract_blend.py +++ b/openpype/hosts/blender/plugins/publish/extract_blend.py @@ -11,6 +11,7 @@ publish, ) from openpype.hosts.blender.api import plugin, get_compress_setting +from openpype.settings.lib import get_project_settings class ExtractBlend(publish.Extractor): @@ -29,6 +30,14 @@ def process(self, instance): filename = f"{instance.name}.blend" filepath = Path(stagingdir, filename) + # If paths management, make paths absolute before saving + project_name = instance.data["projectEntity"]["name"] + project_settings = get_project_settings(project_name) + host_name = instance.context.data["hostName"] + host_settings = project_settings.get(host_name) + if host_settings.get("general", {}).get("use_paths_management"): + bpy.ops.file.make_paths_absolute() + # Perform extraction self.log.info("Performing extraction..")