Skip to content

Commit

Permalink
Merge pull request #21 from OmooLab/feature/dev
Browse files Browse the repository at this point in the history
feat: rewrite resize
  • Loading branch information
icrdr authored Jul 4, 2024
2 parents 467d368 + 1db63dd commit bc6f889
Show file tree
Hide file tree
Showing 25 changed files with 4,653 additions and 496 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/upload-assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
- name: Checkout Code
uses: actions/checkout@v4
with:
lfs: 'true'
lfs: "true"
- name: Zip Add-on
run: |
zip -r package.zip bioxelnodes
Expand All @@ -72,7 +72,7 @@ jobs:
asset_path: ./package.zip
asset_name: BioxelNodes_Addon_${{ needs.draft_release.outputs.version }}.zip
asset_content_type: application/zip

upload_blender_extension:
name: Upload Blender Extension
needs: draft_release
Expand All @@ -81,15 +81,14 @@ jobs:
- name: Checkout Code
uses: actions/checkout@v4
with:
lfs: 'true'
lfs: "true"
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Zip Extension
run: |
pip download SimpleITK --dest bioxelnodes/wheels --only-binary=:all: --python-version=3.11 --platform=macosx_11_0_arm64
pip download SimpleITK --dest bioxelnodes/wheels --only-binary=:all: --python-version=3.11 --platform=win_amd64
pip download SimpleITK==2.3.1 --dest bioxelnodes/wheels --only-binary=:all: --python-version=3.11 --platform=win_amd64
rm -r bioxelnodes/externalpackage
cp extension/__init__.py bioxelnodes/__init__.py
cp extension/preferences.py bioxelnodes/preferences.py
Expand Down
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
[中文文档](https://uj6xfhbzp0.feishu.cn/wiki/Qx3VwHuNPimeI8kr6nDcvl1DnHf?from=from_copylink)

# Bioxel Nodes
# 🦖 Bioxel Nodes

![Static Badge](https://img.shields.io/badge/Blender-orange?style=for-the-badge&logo=blender&logoColor=white)
![GitHub License](https://img.shields.io/github/license/OmooLab/BioxelNodes?style=for-the-badge)
![GitHub Release](https://img.shields.io/github/v/release/OmooLab/BioxelNodes?style=for-the-badge)
![GitHub Repo stars](https://img.shields.io/github/stars/OmooLab/BioxelNodes?style=for-the-badge)

Bioxel Nodes is a Blender add-on for scientific volumetric data visualization. It using Blender's powerful Geometry Nodes | Cycles to process and render volumetric data.
Bioxel Nodes is a Blender extension for scientific volumetric data visualization. It using Blender's powerful Geometry Nodes and Cycles to process and render volumetric data. You are free to share your blender file to anyone who does not install this extension, since most processes were done by Blender's native nodes.

## About

Before us, there have been many tutorials and add-ons for importing volumetric data into Blender. However, we found that there were many details that were not addressed in place, some scientific facts were ignored, and the volume rendering was not pretty enough. With Bioxel Nodes, you can easily import the volumetric data into Blender, and more importantly, it can quickly make a beautiful realistic rendering of it.
Before us, there have been many tutorials and extensions for importing volumetric data into Blender. However, we found that there were many scientific issues that were not addressed in place, and the volume render results were not epic. With Bioxel Nodes, you can easily import any format volumetric data into Blender, and more importantly, make a beautiful realistic volume rendering quickly.

Below are some examples with Bioxel Nodes. Thanks to Cycles Render, the volumetric data can be rendered with great detail:

![cover](docs/assets/cover.png)
![cover](https://omoolab.github.io/BioxelNodes/latest/assets/cover.png)

The "Bioxel" in "Bioxel Nodes", is a combination of the words "Bio-" and "Voxel". Bioxel is a voxel that stores biological data. We are developing a toolkit around Bioxel for better biological data visualization. but before its release, we made this Blender version of bioxels toolkit first, in order to let more people to have fun with volumetric data. [Getting Started](https://omoolab.github.io/BioxelNodes/latest/getting-started)
So how to use this extension? please check [Getting Started](https://omoolab.github.io/BioxelNodes/latest/getting-started)

## Supported Format

Expand All @@ -44,16 +44,16 @@ The "Bioxel" in "Bioxel Nodes", is a combination of the words "Bio-" and "Voxel"
- Sections cannot be generated (will be supported soon)
- Time sequence volume not supported (will be supported soon)

## To Upgrade Add-on
## Upgrade from 0.1.x to 0.2.x

To upgrade from an older version of the add-on to the latest, you need to do the following:
You need to do the following:

1. Remove the old version of Bioxel Nodes at Preferences > Add-ons
2. Add the new version and restart Blender.

It is not support editing the same blender file across add-on versions. In order to make sure that the previous file works properly. You need to save the staged data before upgrading ( read the last section of [Getting Started](https://omoolab.github.io/BioxelNodes/latest/getting-started/#share-your-file) ).
It is not support editing the same blender file across extension versions. In order to make sure that the previous file works properly. You need to save the staged data before upgrading ( read the last section of [Getting Started](https://omoolab.github.io/BioxelNodes/latest/getting-started/#share-your-file) ).

But even then, there is still no guarantee that the new version of the add-on will work on the old blender file. Therefore, it is highly recommended to open a new blender file to start the creating, not based on the old one.
But even then, there is still no guarantee that the new version of the extension will work on the old blender file. Therefore, it is highly recommended to open a new blender file to start the creating, not based on the old one.

Alternatively, objects from the old file that have nothing to do with Bioxel Nodes could be append to the new blender file.

Expand Down
4 changes: 2 additions & 2 deletions bioxelnodes/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"author": "Ma Nan",
"description": "",
"blender": (4, 0, 0),
"version": (0, 2, 0),
"version": (0, 2, 3),
"location": "File -> Import",
"warning": "",
"category": "Node"
Expand All @@ -22,7 +22,7 @@ def register():
auto_load.register()
menus.add()
bpy.types.Scene.bioxel_layer_dir = bpy.props.StringProperty(
name="Bioxel Layers Directory",
name="Layer Directory",
subtype='DIR_PATH',
default="//"
)
Expand Down
4 changes: 2 additions & 2 deletions bioxelnodes/assets/Nodes/BioxelNodes_4.1.blend
Git LFS file not shown
12 changes: 6 additions & 6 deletions bioxelnodes/customnodes/menus.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

class SaveAllNodes(bpy.types.Operator):
bl_idname = "customnodes.save_all_nodes"
bl_label = "Save All Custom Nodes"
bl_label = "Save All Nodes"
bl_description = "Save All Custom Nodes to Directory."
bl_options = {'UNDO'}

Expand All @@ -21,9 +21,9 @@ def execute(self, context):
for file in files:
file_name = Path(file).name
# "//"
custom_nodes_dir = bpy.path.abspath(context.scene.custom_nodes_dir)
customnodes_node_dir = bpy.path.abspath(context.scene.customnodes_node_dir)

output_path: Path = Path(custom_nodes_dir, file_name).resolve()
output_path: Path = Path(customnodes_node_dir, file_name).resolve()
source_path: Path = Path(file).resolve()

if output_path != source_path:
Expand Down Expand Up @@ -51,7 +51,7 @@ class CUSTOMNODES_PT_CustomNodes(bpy.types.Panel):
def draw(self, context):
layout = self.layout
scene = context.scene
layout.prop(scene, 'custom_nodes_dir')
layout.prop(scene, 'customnodes_node_dir')
layout.operator(SaveAllNodes.bl_idname)


Expand Down Expand Up @@ -181,8 +181,8 @@ def register(self):
bpy.utils.register_class(cls)

bpy.types.NODE_MT_add.append(self.add_node_menu)
bpy.types.Scene.custom_nodes_dir = bpy.props.StringProperty(
name="Nodes Directory",
bpy.types.Scene.customnodes_node_dir = bpy.props.StringProperty(
name="Node Directory",
subtype='DIR_PATH',
default="//"
)
Expand Down
Loading

0 comments on commit bc6f889

Please sign in to comment.