Skip to content

5.0 - #63

Merged
icrdr merged 25 commits into
mainfrom
5.0
Jul 8, 2026
Merged

5.0#63
icrdr merged 25 commits into
mainfrom
5.0

Conversation

@icrdr

@icrdr icrdr commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR updates the volumetric import flow so the expensive import stage runs in a background Blender CLI worker instead of blocking the main Blender UI.

Key changes:

  • Register a Blender CLI command, bioxelnodes_import_worker, via bpy.utils.register_cli_command
  • Replace direct --python io_worker.py execution with the official CLI command path
  • Remove manual sys.path modification from the worker
  • Support Blender Extension module names such as bl_ext.xxx.bioxelnodes
  • Keep metadata reading synchronous on the main thread to avoid unsupported threading / queue usage
  • Run the heavy import stage in a background Blender process:
    • parse volumetric data
    • resize/process layers
    • write layer cache files
    • write progress/result JSON
  • Split cache writing into save_layers_to_cache() so the worker can write cache metadata and the main process can merge it back into Blender state
  • Improve worker progress messages for startup, module loading, parsing, and processing stages

Design Notes

The final design avoids unsupported patterns:

  • no sys.path mutation
  • no threading
  • no queue
  • no direct execution of worker files as standalone scripts

Metadata loading is done synchronously because it is a lower-frequency, lighter step compared with the full import. The expensive import work still runs outside the main Blender process.

Tradeoffs

  • The first heavy import still needs to start a background Blender process
  • Metadata reading may briefly block the UI
  • No persistent worker/server is introduced yet, keeping lifecycle complexity low
  • Repeated imports will still start a new background process each time

Verification

uv run python -m compileall src\bioxelnodes\operators\io.py src\bioxelnodes\operators\io_worker.py
git diff --check -- src\bioxelnodes\operators\io.py src\bioxelnodes\operators\io_worker.py

icrdr added 25 commits January 21, 2026 12:42
- Introduced a new asset catalog definition file for Blender to manage Bioxel assets.
- Implemented layer caching and snapshot functionality in `layer.py`, allowing for VDB file generation and low-resolution snapshots.
- Created node management functions in `node.py` for handling Bioxel nodes within Blender's Geometry Node Editor.
- Added an operator to extract mesh data from selected nodes in `structure.py`.
- Developed UI panels in `panels.py` for layer management, including import options and layer library display.
- Created README.md for test instructions and categories.
- Implemented comprehensive unit tests for the Data, Layer, and utility functions in the bioxel module.
- Added tests for reading NRRD and DICOM formats, data properties, and edge cases.
- Included tests for real data files to ensure functionality with actual datasets.
…ent and ignore patterns

chore: Add app.json and omoolab.css for Obsidian integration

refactor: Clean up AGENTS.md and remove outdated test files
…nhance styling with new fonts. Update mkdocs configuration for multilingual support and improve package dependencies.
… tips

- Created English and Chinese documentation for basic usage of the add-on, including data download, import, extraction, and rendering steps.
- Added support format documentation listing compatible file types for the add-on.
- Included links to open databases for volumetric data.
- Provided performance improvement tips for voxel reconstruction and rendering, including settings for low-resolution previews and balanced rendering configurations.
- Implement openspec-apply-change skill for applying tasks from OpenSpec changes.
- Create openspec-archive-change skill for archiving completed changes.
- Introduce openspec-explore skill for exploring ideas and clarifying requirements.
- Add openspec-propose skill for proposing new changes with generated artifacts.
- Migrate source command skills: source-command-opsx-apply, source-command-opsx-archive, source-command-opsx-explore, and source-command-opsx-propose for improved command handling.
- Deleted _ni_support.py, _utils.py, and dtype.py as they contained unused or redundant functions.
- Removed the resize function and related utilities from _warps.py to streamline image processing.
- Cleaned up the skimage module by removing unnecessary imports and functions.
…r and refactor io_worker for improved module handling
@icrdr
icrdr merged commit 1ced263 into main Jul 8, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant