Skip to content

Commit

Permalink
Merge pull request #33 from Tilix4/fx_relative_published_workfile_paths
Browse files Browse the repository at this point in the history
Fix: Published workfile relative paths are not correctly remapped
  • Loading branch information
kaamaurice authored Jan 20, 2023
2 parents 61f2c60 + b86febf commit 1a05f6d
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 1a05f6d

Please sign in to comment.