From 2c3d9e57913fa24f88a8e5456dd2561bd61dbbd9 Mon Sep 17 00:00:00 2001 From: Ma Nan Date: Thu, 25 Apr 2024 12:12:43 +0800 Subject: [PATCH] fix: save all node path not right --- README.md | 2 +- bioxelnodes/__init__.py | 2 +- bioxelnodes/customnodes/menu.py | 3 ++- bioxelnodes/io.py | 12 ++++++------ 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index c2f1f45..909cbc5 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ First you need to have your volumetric data ready. If not, you can access open r Note: Make sure one folder contains only one sequence, multiple sequences need to be manually split into different folders first. -In Blender, `File - Import - Volume Data as Biovels`, select **one** of the .dcm files and click on "Volume Data as Bioxels" (you can also drag one of the .dcm files directly into the 3D viewport to trigger the import, but this is limited to .dcm format files) +In Blender, `File - Import - Volume Data as Bioxels`, select **one** of the .dcm files and click on "Volume Data as Bioxels" (you can also drag one of the .dcm files directly into the 3D viewport to trigger the import, but this is limited to .dcm format files) ![importing](docs/images/importing.png) diff --git a/bioxelnodes/__init__.py b/bioxelnodes/__init__.py index a664e24..aa34072 100644 --- a/bioxelnodes/__init__.py +++ b/bioxelnodes/__init__.py @@ -6,7 +6,7 @@ bl_info = { - "name": "Biovel Nodes", + "name": "Bioxel Nodes", "author": "Ma Nan", "description": "", "blender": (4, 1, 0), diff --git a/bioxelnodes/customnodes/menu.py b/bioxelnodes/customnodes/menu.py index 896c606..78c0fac 100644 --- a/bioxelnodes/customnodes/menu.py +++ b/bioxelnodes/customnodes/menu.py @@ -36,7 +36,8 @@ def execute(self, context): 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)) diff --git a/bioxelnodes/io.py b/bioxelnodes/io.py index cbd153d..e93a7de 100644 --- a/bioxelnodes/io.py +++ b/bioxelnodes/io.py @@ -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 @@ def invoke(self, context, event): 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 @@ def invoke(self, context, event): 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(