Merge pull request #9 from OmooLab/feature/dev

fix: save all node path not right
This commit is contained in:
Ma Nan
2024-04-25 12:13:04 +08:00
committed by GitHub
4 changed files with 10 additions and 9 deletions

View File

@@ -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. 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) ![importing](docs/images/importing.png)

View File

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

View File

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

View File

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