feat: support blender 4.2 extension
This commit is contained in:
22
extension/__init__.py
Normal file
22
extension/__init__.py
Normal file
@@ -0,0 +1,22 @@
|
||||
import bpy
|
||||
|
||||
from . import auto_load
|
||||
from . import menus
|
||||
|
||||
|
||||
auto_load.init()
|
||||
|
||||
|
||||
def register():
|
||||
auto_load.register()
|
||||
menus.add()
|
||||
bpy.types.Scene.bioxel_layer_dir = bpy.props.StringProperty(
|
||||
name="Bioxel Layers Directory",
|
||||
subtype='DIR_PATH',
|
||||
default="//"
|
||||
)
|
||||
|
||||
|
||||
def unregister():
|
||||
menus.remove()
|
||||
auto_load.unregister()
|
||||
56
extension/blender_manifest.toml
Normal file
56
extension/blender_manifest.toml
Normal file
@@ -0,0 +1,56 @@
|
||||
schema_version = "1.0.0"
|
||||
|
||||
# Example of manifest file for a Blender extension
|
||||
# Change the values according to your extension
|
||||
id = "bioxelnodes"
|
||||
version = "0.2.0"
|
||||
name = "Bioxel Nodes"
|
||||
tagline = "For scientific volumetric data visualization in Blender"
|
||||
maintainer = "Ma Nan <icrdr2010@outlook.com>"
|
||||
# Supported types: "add-on", "theme"
|
||||
type = "add-on"
|
||||
|
||||
# Optional: add-ons can list which resources they will require:
|
||||
# * "files" (for access of any filesystem operations)
|
||||
# * "network" (for internet access)
|
||||
# * "clipboard" (to read and/or write the system clipboard)
|
||||
# * "camera" (to capture photos and videos)
|
||||
# * "microphone" (to capture audio)
|
||||
permissions = ["files"]
|
||||
|
||||
# Optional link to documentation, support, source files, etc
|
||||
website = "https://omoolab.github.io/BioxelNodes/latest"
|
||||
|
||||
# Optional list defined by Blender and server, see:
|
||||
# https://docs.blender.org/manual/en/dev/extensions/tags.html
|
||||
tags = ["Geometry Nodes", "Render", "Material"]
|
||||
|
||||
blender_version_min = "4.2.0"
|
||||
# Optional: maximum supported Blender version
|
||||
# blender_version_max = "5.1.0"
|
||||
|
||||
# License conforming to https://spdx.org/licenses/ (use "SPDX: prefix)
|
||||
# https://docs.blender.org/manual/en/dev/extensions/licenses.html
|
||||
license = ["SPDX:MIT"]
|
||||
# Optional: required by some licenses.
|
||||
copyright = ["2024 OmooLab"]
|
||||
|
||||
# Optional list of supported platforms. If omitted, the extension will be available in all operating systems.
|
||||
platforms = ["windows-amd64", "macos-x86_64"]
|
||||
# Other supported platforms: "windows-arm64", "macos-x86_64"
|
||||
|
||||
# TODO: externalpackage to wheels
|
||||
# Optional: bundle 3rd party Python modules.
|
||||
# https://docs.blender.org/manual/en/dev/extensions/python_wheels.html
|
||||
wheels = [
|
||||
"./wheels/SimpleITK-2.3.1-cp311-cp311-win_amd64.whl",
|
||||
"./wheels/SimpleITK-2.3.1-cp311-cp311-macosx_11_0_arm64.whl",
|
||||
]
|
||||
|
||||
# Optional: build setting.
|
||||
# https://docs.blender.org/manual/en/dev/extensions/command_line_arguments.html#command-line-args-extension-build
|
||||
# [build]
|
||||
# paths_exclude_pattern = [
|
||||
# "/.git/"
|
||||
# "__pycache__/"
|
||||
# ]
|
||||
23
extension/preferences.py
Normal file
23
extension/preferences.py
Normal file
@@ -0,0 +1,23 @@
|
||||
import bpy
|
||||
from pathlib import Path
|
||||
|
||||
class BioxelNodesPreferences(bpy.types.AddonPreferences):
|
||||
bl_idname = __package__
|
||||
|
||||
cache_dir: bpy.props.StringProperty(
|
||||
name="Set Cache Directory",
|
||||
subtype='DIR_PATH',
|
||||
default=str(Path(Path.home(), '.bioxelnodes'))
|
||||
) # type: ignore
|
||||
|
||||
do_change_render_setting: bpy.props.BoolProperty(
|
||||
name="Change Render Setting",
|
||||
default=True,
|
||||
) # type: ignore
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
layout.label(text="Configuration")
|
||||
layout.prop(self, 'cache_dir')
|
||||
layout.prop(self, "do_change_render_setting")
|
||||
Reference in New Issue
Block a user