Skip to main content

OmooNodes

omoonodes 提供 Python API 和 omoonodes 命令,用于 Blender 4.5、5.2 节点的 .py ↔ .blend 转换与资产库构建。

在消费项目中安装本仓库的固定提交:

uv add --dev "omoonodes @ git+https://github.com/OmooLab/OmooNodes.git@<commit>"

将 <commit> 替换为完整提交 SHA,并提交 pyproject.toml 和 uv.lock。CI 使用 uv sync --locked 安装同一版本。

安装后,在消费项目的 pyproject.toml 中配置:

[tool.omoonodes]
targets = ["b45", "b52"]
source = "nodes"

uv run omoonodes dev 生成最低目标的人工编辑库,uv run omoonodes dev -s workspaces --target b45 回写源码,uv run omoonodes build 构建资产库。uv run omoonodes dump library.blend -o nodes/Library --target b45 导入已有库。uv 自动准备对应 bpy;输入库必须与目标主次版本一致。

每个库的 collection.json 指定源目录:

{"files": {"Library.blend": {"source": "geometry"}}}

在 nodes/Library/geometry/example.py 中编写:

from omoonodes import TreeBuilder
from omoonodes.builder import CustomGeometryGroup

class Example(CustomGeometryGroup):
    _name = 'Example'

    def _build_group(self, tree: TreeBuilder):
        value = tree.inputs.float('Value', 1.0)
        result = tree.outputs.float('Result')
        value * 2.0 >> result

ASSET = Example

沿用 nodebpy 的节点类、Socket 运算和 >> 连线写法。tree.tree、node.node 可直接访问 bpy;原生差异由工具处理。dev、build 自动布局,源码不记录节点位置或布局开关。

ASSET_METADATA 按字段换行,顺序为 description、author、copyright、license、catalog_id、tags,省略空字段。浮点数使用保持 Blender 精度的简短十进制,不加数字分隔符。接口的 optional_label 在 5.2 控制标签显示,4.5 往返时保留此设置。

每个需要回写的节点组或材质占一个 .py。未修改的手写代码保持原样,修改后仍导出为 nodebpy 写法。Blender 脚本可直接调用 omoonodes.assets.build_library 和 omoonodes.export.dump_library。

材质类的 _name 与 MATERIAL_NAME 使用实际材质名。MATERIAL_PROPERTIES 按字段换行,记录 Blender 原生材质设置;插件附加的自定义属性不参与回写。

跨库也使用类导入,例如 from nodes.Library.geometry.example import Example。nodes 指向当前目标选出的源码根目录;collection.json 的 dependencies、links 指定构建顺序和外部链接,调用导入的类时复用已链接的节点组。

.py 是共享基础,.b52.py 是完整专用实现,DISABLED = True 表示停用。同步跳过未修改的内容;共享修改必须通过所有继承目标的原生构建验证,失败时保留源码。验证结构保真,效果由项目验证。

Metadata

Release files for omoonodes 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for omoonodes 0.1.2
File Size Uploaded Provenance Actions
omoonodes-0.1.2.tar.gz 197.2 kB Without provenance Details for omoonodes-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for omoonodes 0.1.2
File Interpreter ABI Platform Actions
omoonodes-0.1.2-py3-none-any.whl Python 3 none any Details for omoonodes-0.1.2-py3-none-any.whl

Total release size: 446.5 kB

Release files / omoonodes-0.1.2.tar.gz

Download URL omoonodes-0.1.2.tar.gz
Size 197.2 kB
Tags Source
SHA-256 checksum
How to use checksums
31798621d3fd29af158cd0e60a25f9c86ff8dc42792ae453486d7b78eaedf53d
BLAKE2b-256 checksum
How to use checksums
44e0605d3204f1b2e2e32bd1b0f5c4ef50b1d0391046cb5c2442b10b657e04fb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / omoonodes-0.1.2-py3-none-any.whl

Download URL omoonodes-0.1.2-py3-none-any.whl
Size 249.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
31eaa14f560093b5a062ebc9905a744458910e53db8597d6eb8b9212b9e9683d
BLAKE2b-256 checksum
How to use checksums
760aa11443e93c3cbfd9862316d0680697266044d3b547044d066955b32951b1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for omoonodes 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page