Skip to content
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
max-parallel: 4
fail-fast: false
matrix:
blender-version: ["4.4.0"]
blender-version: ["5.0.0"]
os: [ubuntu-latest, windows-latest, macos-13]
# os: [ubuntu-latest]
steps:
Expand Down
4 changes: 2 additions & 2 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

toml_path = "microscopynodes/blender_manifest.toml"
whl_path = "./microscopynodes/wheels"
blender_path ="/Users/oanegros/Documents/blenderBuilds/stable/blender-4.5.3-macos-arm64+lts.67807e1800cc/Blender/Blender.app/Contents/MacOS/Blender"

blender_path =r"/Applications/Blender_5a.app/Contents/MacOS/Blender"
blender_path = "/Users/oanegros/Documents/blenderBuilds/daily/blender-5.0.0-alpha+daily.022d0edf2297+ma/Blender/Blender.app/Contents/MacOS/Blender"
# permanent_whls = ["./microscopynodes/wheels/asciitree-0.3.4.dev1-py3-none-any.whl"]

@dataclass
Expand Down
54 changes: 29 additions & 25 deletions microscopynodes/blender_manifest.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
schema_version = "1.0.0"

id = "microscopynodes"
version = "2.2.6"
version = "2.2.7"
name = "Microscopy Nodes"
tagline = "Handling microscopy data in Blender, up to 5D volumes"
maintainer = "Aafke Gros <[email protected]>"
Expand All @@ -19,7 +19,7 @@ platforms = [
tags = [
"Import-Export"
]
blender_version_min = "4.4.0"
blender_version_min = "5.0.0"
license = [
"SPDX:GPL-3.0-or-later"
]
Expand All @@ -34,52 +34,56 @@ wheels = [
"./wheels/PyYAML-6.0.2-cp311-cp311-macosx_11_0_arm64.whl",
"./wheels/PyYAML-6.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
"./wheels/PyYAML-6.0.2-cp311-cp311-win_amd64.whl",
"./wheels/aiobotocore-2.24.2-py3-none-any.whl",
"./wheels/aiobotocore-2.25.0-py3-none-any.whl",
"./wheels/aiohappyeyeballs-2.6.1-py3-none-any.whl",
"./wheels/aiohttp-3.12.15-cp311-cp311-macosx_10_9_x86_64.whl",
"./wheels/aiohttp-3.12.15-cp311-cp311-macosx_11_0_arm64.whl",
"./wheels/aiohttp-3.12.15-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
"./wheels/aiohttp-3.12.15-cp311-cp311-win_amd64.whl",
"./wheels/aiohttp-3.13.0-cp311-cp311-macosx_10_9_x86_64.whl",
"./wheels/aiohttp-3.13.0-cp311-cp311-macosx_11_0_arm64.whl",
"./wheels/aiohttp-3.13.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl",
"./wheels/aiohttp-3.13.0-cp311-cp311-win_amd64.whl",
"./wheels/aioitertools-0.12.0-py3-none-any.whl",
"./wheels/aiosignal-1.4.0-py3-none-any.whl",
"./wheels/attrs-25.4.0-py3-none-any.whl",
"./wheels/botocore-1.40.18-py3-none-any.whl",
"./wheels/botocore-1.40.49-py3-none-any.whl",
"./wheels/click-8.3.0-py3-none-any.whl",
"./wheels/cloudpickle-3.1.1-py3-none-any.whl",
"./wheels/cmap-0.6.0-py3-none-any.whl",
"./wheels/crc32c-2.7.1-cp311-cp311-macosx_10_9_x86_64.whl",
"./wheels/crc32c-2.7.1-cp311-cp311-macosx_11_0_arm64.whl",
"./wheels/crc32c-2.7.1-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
"./wheels/crc32c-2.7.1-cp311-cp311-win_amd64.whl",
"./wheels/crc32c-2.7.1.post0-cp311-cp311-macosx_10_9_x86_64.whl",
"./wheels/crc32c-2.7.1.post0-cp311-cp311-macosx_11_0_arm64.whl",
"./wheels/crc32c-2.7.1.post0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl",
"./wheels/crc32c-2.7.1.post0-cp311-cp311-win_amd64.whl",
"./wheels/dask-2025.5.1-py3-none-any.whl",
"./wheels/donfig-0.8.1.post1-py3-none-any.whl",
"./wheels/frozenlist-1.8.0-cp311-cp311-macosx_10_9_x86_64.whl",
"./wheels/frozenlist-1.8.0-cp311-cp311-macosx_11_0_arm64.whl",
"./wheels/frozenlist-1.8.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl",
"./wheels/frozenlist-1.8.0-cp311-cp311-win_amd64.whl",
"./wheels/frozenlist-1.8.0-cp311-cp311-macosx_10_9_x86_64.whl",
"./wheels/frozenlist-1.8.0-cp311-cp311-macosx_11_0_arm64.whl",
"./wheels/frozenlist-1.8.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl",
"./wheels/frozenlist-1.8.0-cp311-cp311-win_amd64.whl",
"./wheels/fsspec-2025.5.1-py3-none-any.whl",
"./wheels/idna-3.10-py3-none-any.whl",
"./wheels/idna-3.11-py3-none-any.whl",
"./wheels/imagecodecs-2025.3.30-cp311-cp311-macosx_10_14_x86_64.whl",
"./wheels/imagecodecs-2025.3.30-cp311-cp311-macosx_11_0_arm64.whl",
"./wheels/imagecodecs-2025.3.30-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
"./wheels/imagecodecs-2025.3.30-cp311-cp311-win_amd64.whl",
"./wheels/importlib_metadata-8.7.0-py3-none-any.whl",
"./wheels/jmespath-1.0.1-py3-none-any.whl",
"./wheels/locket-1.0.0-py2.py3-none-any.whl",
"./wheels/multidict-6.6.4-cp311-cp311-macosx_10_9_x86_64.whl",
"./wheels/multidict-6.6.4-cp311-cp311-macosx_11_0_arm64.whl",
"./wheels/multidict-6.6.4-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl",
"./wheels/multidict-6.6.4-cp311-cp311-win_amd64.whl",
"./wheels/multidict-6.7.0-cp311-cp311-macosx_10_9_x86_64.whl",
"./wheels/multidict-6.7.0-cp311-cp311-macosx_11_0_arm64.whl",
"./wheels/multidict-6.7.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl",
"./wheels/multidict-6.7.0-cp311-cp311-win_amd64.whl",
"./wheels/numcodecs-0.16.3-cp311-cp311-macosx_10_13_x86_64.whl",
"./wheels/numcodecs-0.16.3-cp311-cp311-macosx_11_0_arm64.whl",
"./wheels/numcodecs-0.16.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
"./wheels/numcodecs-0.16.3-cp311-cp311-win_amd64.whl",
"./wheels/packaging-25.0-py3-none-any.whl",
"./wheels/partd-1.4.2-py3-none-any.whl",
"./wheels/propcache-0.4.0-cp311-cp311-macosx_10_9_x86_64.whl",
"./wheels/propcache-0.4.0-cp311-cp311-macosx_11_0_arm64.whl",
"./wheels/propcache-0.4.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl",
"./wheels/propcache-0.4.0-cp311-cp311-win_amd64.whl",
"./wheels/propcache-0.4.1-cp311-cp311-macosx_10_9_x86_64.whl",
"./wheels/propcache-0.4.1-cp311-cp311-macosx_11_0_arm64.whl",
"./wheels/propcache-0.4.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl",
"./wheels/propcache-0.4.1-cp311-cp311-win_amd64.whl",
"./wheels/python_dateutil-2.9.0.post0-py2.py3-none-any.whl",
"./wheels/s3fs-2025.5.1-py3-none-any.whl",
"./wheels/six-1.17.0-py2.py3-none-any.whl",
Expand All @@ -91,10 +95,10 @@ wheels = [
"./wheels/wrapt-1.17.3-cp311-cp311-macosx_11_0_arm64.whl",
"./wheels/wrapt-1.17.3-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl",
"./wheels/wrapt-1.17.3-cp311-cp311-win_amd64.whl",
"./wheels/yarl-1.21.0-cp311-cp311-macosx_10_9_x86_64.whl",
"./wheels/yarl-1.21.0-cp311-cp311-macosx_11_0_arm64.whl",
"./wheels/yarl-1.21.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl",
"./wheels/yarl-1.21.0-cp311-cp311-win_amd64.whl",
"./wheels/yarl-1.22.0-cp311-cp311-macosx_10_9_x86_64.whl",
"./wheels/yarl-1.22.0-cp311-cp311-macosx_11_0_arm64.whl",
"./wheels/yarl-1.22.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl",
"./wheels/yarl-1.22.0-cp311-cp311-win_amd64.whl",
"./wheels/zarr-3.0.8-py3-none-any.whl",
"./wheels/zipp-3.23.0-py3-none-any.whl",
"./wheels/zmesh-1.8.0-cp311-cp311-macosx_10_9_universal2.whl",
Expand Down
7 changes: 5 additions & 2 deletions microscopynodes/load.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ def load_blocking(params):
continue
data_io = DataIOFactory(min_type)
ch_obj = ChannelObjectFactory(min_type, objs[min_type])
# print(ch_obj.scale, scale)
ch_obj.obj.scale = scale
# print(ch_obj.scale, scale)

for ch in ch_dicts:
if ch[min_type] and scn.MiN_update_data:
Expand Down Expand Up @@ -137,7 +140,7 @@ def set_render_settings():

bpy.context.scene.render.engine = 'CYCLES'
bpy.context.scene.cycles.transparent_max_bounces = 40 # less slicing artefacts
bpy.context.scene.cycles.volume_bounces = 32
bpy.context.scene.cycles.volume_max_steps = 16 # less time to render
# bpy.context.scene.cycles.volume_bounces = 32
# bpy.context.scene.cycles.volume_max_steps = 16 # less time to render
bpy.context.scene.cycles.use_denoising = False # this will introduce noise, but at least also not remove data-noise=
return
4 changes: 3 additions & 1 deletion microscopynodes/load_components/load_generic.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import bpy, bpy_types
import bpy
from ..handle_blender_structs import *
import numpy as np

Expand Down Expand Up @@ -164,6 +164,8 @@ def channel_nodes(self, x, y, ch):
loadnode.hide = True
loadnode.label = ch['name']
loadnode.transform_space='RELATIVE'
loadnode.inputs.get('Reset Children').default_value = True
loadnode.inputs.get('Separate Children').default_value = True

# reload-func:
loadnode.name = f"channel_load_{ch['identifier']}"
Expand Down
1 change: 0 additions & 1 deletion microscopynodes/load_components/load_labelmask.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ def export_ch(self, ch, cache_dir, remake, axes_order):


bpy.ops.wm.alembic_export(filepath=fname,
visible_objects_only=False,
selected=True,
vcolors = False,
flatten=False,
Expand Down
1 change: 1 addition & 0 deletions microscopynodes/load_components/load_slice_cube.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import numpy as np

def load_slice_cube(size_px, scale, scale_factor, container, slicecube=None):

if slicecube is None:
bpy.ops.mesh.primitive_cube_add(location=size_px*scale/2)
slicecube = bpy.context.active_object
Expand Down
7 changes: 5 additions & 2 deletions microscopynodes/load_components/load_surfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ def add_material(self, ch):
print(e)
pass
princ = nodes.new("ShaderNodeBsdfPrincipled")
if nodes.get("Material Output") is None:
out = nodes.new(type="ShaderNodeOutputMaterial")
out.location = (400,0)
links.new(princ.outputs[0], nodes.get('Material Output').inputs[0])

princ = nodes.get("Principled BSDF")
Expand Down Expand Up @@ -90,10 +93,10 @@ def update_gn(self, ch):
v2m = self.node_group.nodes[f"VOL_TO_MESH_{ch['identifier']}"]

if ch['surf_resolution'] == 0:
v2m.resolution_mode='GRID'
v2m.inputs[1].default_value='Grid'
return
else:
v2m.resolution_mode='VOXEL_SIZE'
v2m.inputs[1].default_value='Size'

for i in range(4):
socket = get_socket(self.node_group, ch, min_type='VOXEL_SIZE', internal_append=str(i))
Expand Down
4 changes: 2 additions & 2 deletions microscopynodes/load_components/load_volume.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def make_vdbs(self, imgdata, block, axes_order, remake, cache_dir, ch):
histogram[0] = 0
np.save(histfname, histogram, allow_pickle=False)
log(f"write vdb {identifier5d}")
self.make_vdb(vdbfname, arr, f"c{ch['ix']}")
self.make_vdb(vdbfname, arr, f"data")

return str(dirpath), time_vdbs, time_hists

Expand All @@ -115,7 +115,7 @@ def make_vdb(self, vdbfname, arr, gridname):
import openvdb as vdb
pass
grid = vdb.FloatGrid()
grid.name = f"data"
grid.name = gridname
grid.copyFromArray(arr)
# For future OME-Zarr transforms - something like this:
# grid.transform = vdb.createLinearTransform(np.array([[ 2. , 0. , 0. , 8.5],[ 0. , 2. , 0. , 8.5],[ 0. , 0. , 2. , 10.5],[ 0. , 0. , 0. , 1. ]]).T)
Expand Down
Loading