Skip to content

Commit

Permalink
Fix: Published workfile relative paths are not correctly remapped
Browse files Browse the repository at this point in the history
  • Loading branch information
Tilix4 committed Jan 20, 2023
1 parent 5008c1b commit b86febf
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions openpype/hosts/blender/plugins/publish/extract_blend.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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..")

Expand Down

0 comments on commit b86febf

Please sign in to comment.