fix: save all node path not right

This commit is contained in:
2024-04-25 12:12:43 +08:00
parent d663bfd290
commit 2c3d9e5791
4 changed files with 10 additions and 9 deletions

View File

@@ -36,7 +36,8 @@ class SaveAllNodes(bpy.types.Operator):
shutil.copy(source_path, output_path)
for lib in bpy.data.libraries:
if lib.filepath == file:
lib_path = str(Path(bpy.path.abspath(lib.filepath)).resolve())
if lib_path == file:
blend_path = Path(bpy.path.abspath("//")).resolve()
lib.filepath = bpy.path.relpath(
str(output_path), start=str(blend_path))