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

@@ -6,7 +6,7 @@ import bpy
bl_info = {
"name": "Biovel Nodes",
"name": "Bioxel Nodes",
"author": "Ma Nan",
"description": "",
"blender": (4, 1, 0),

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))

View File

@@ -69,8 +69,8 @@ def on_info_changed(self, context):
class ImportDICOMDialog(bpy.types.Operator):
bl_idname = "bioxelnodes.import_dicom_dialog"
bl_label = "Volume Data as Biovels"
bl_description = "Import Volume Data as Biovels (VDB)."
bl_label = "Volume Data as Bioxels"
bl_description = "Import Volume Data as Bioxels (VDB)."
bl_options = {'UNDO'}
filepath: bpy.props.StringProperty(
@@ -347,8 +347,8 @@ class ImportDICOMDialog(bpy.types.Operator):
class ReadDICOM(bpy.types.Operator):
bl_idname = "bioxelnodes.read_dicom"
bl_label = "Volume Data as Biovels"
bl_description = "Import Volume Data as Biovels (VDB)."
bl_label = "Volume Data as Bioxels"
bl_description = "Import Volume Data as Bioxels (VDB)."
bl_options = {'UNDO'}
filepath: bpy.props.StringProperty(
@@ -403,8 +403,8 @@ class ReadDICOM(bpy.types.Operator):
class ImportDICOM(bpy.types.Operator):
bl_idname = "bioxelnodes.import_dicom"
bl_label = "Volume Data as Biovels"
bl_description = "Import Volume Data as Biovels (VDB)."
bl_label = "Volume Data as Bioxels"
bl_description = "Import Volume Data as Bioxels (VDB)."
bl_options = {'UNDO'}
filepath: bpy.props.StringProperty(