feat: add more format support
This commit is contained in:
@@ -40,7 +40,7 @@ else:
|
||||
|
||||
MENU_ITEMS = [
|
||||
{
|
||||
'label': 'Present',
|
||||
'label': 'Presets',
|
||||
'icon': 'MESH_MONKEY',
|
||||
'items': [
|
||||
{
|
||||
@@ -52,17 +52,17 @@ MENU_ITEMS = [
|
||||
set_prop_to_node_factory("bioxel_size", "Detail Size"),
|
||||
set_prop_to_node_factory("bioxels_offset", "Offset"),
|
||||
])
|
||||
},
|
||||
{
|
||||
'label': 'Anatomy',
|
||||
'icon': 'CONSTRAINT_BONE',
|
||||
'node_type': 'BioxelNodes_Anatomy',
|
||||
'node_description': '',
|
||||
'node_callback': "\n".join([
|
||||
set_prop_to_node_factory("bioxel_size", "Detail Size"),
|
||||
set_prop_to_node_factory("bioxels_offset", "Offset"),
|
||||
])
|
||||
}
|
||||
# {
|
||||
# 'label': 'Anatomy',
|
||||
# 'icon': 'CONSTRAINT_BONE',
|
||||
# 'node_type': 'BioxelNodes_Anatomy',
|
||||
# 'node_description': '',
|
||||
# 'node_callback': "\n".join([
|
||||
# set_prop_to_node_factory("bioxel_size", "Detail Size"),
|
||||
# set_prop_to_node_factory("bioxels_offset", "Offset"),
|
||||
# ])
|
||||
# }
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -71,7 +71,7 @@ MENU_ITEMS = [
|
||||
'items': [
|
||||
{
|
||||
'label': 'Segment by Level',
|
||||
'icon': 'AREA_JOIN',
|
||||
'icon': 'EMPTY_SINGLE_ARROW',
|
||||
'node_type': 'BioxelNodes_SegmentByLevel',
|
||||
'node_description': '',
|
||||
'node_callback': "\n".join([
|
||||
@@ -81,24 +81,24 @@ MENU_ITEMS = [
|
||||
},
|
||||
{
|
||||
'label': 'Segment by Range',
|
||||
'icon': 'AREA_SWAP',
|
||||
'icon': 'IPO_CONSTANT',
|
||||
'node_type': 'BioxelNodes_SegmentByRange',
|
||||
'node_description': '',
|
||||
'node_callback': "\n".join([
|
||||
set_prop_to_node_factory("bioxel_size", "Detail Size"),
|
||||
set_prop_to_node_factory("bioxels_offset", "Offset"),
|
||||
])
|
||||
},
|
||||
{
|
||||
'label': 'Segment by Layers',
|
||||
'icon': 'OUTLINER_OB_FORCE_FIELD',
|
||||
'node_type': 'BioxelNodes_SegmentsByLayers',
|
||||
'node_description': '',
|
||||
'node_callback': "\n".join([
|
||||
set_prop_to_node_factory("bioxel_size", "Detail Size"),
|
||||
set_prop_to_node_factory("bioxels_offset", "Offset"),
|
||||
])
|
||||
}
|
||||
# {
|
||||
# 'label': 'Segment by Layers',
|
||||
# 'icon': 'ALIGN_JUSTIFY',
|
||||
# 'node_type': 'BioxelNodes_SegmentsByLayers',
|
||||
# 'node_description': '',
|
||||
# 'node_callback': "\n".join([
|
||||
# set_prop_to_node_factory("bioxel_size", "Detail Size"),
|
||||
# set_prop_to_node_factory("bioxels_offset", "Offset"),
|
||||
# ])
|
||||
# }
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -112,8 +112,13 @@ MENU_ITEMS = [
|
||||
'node_description': ''
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
}
|
||||
]
|
||||
|
||||
NODE_FILE = "BioxelNodes_4.0"
|
||||
|
||||
if bpy.app.version >= (4, 1, 0):
|
||||
MENU_ITEMS.append({
|
||||
'label': 'Slicer',
|
||||
'icon': 'CLIPUV_DEHLT',
|
||||
'items': [
|
||||
@@ -136,12 +141,21 @@ MENU_ITEMS = [
|
||||
'node_description': '',
|
||||
}
|
||||
]
|
||||
},
|
||||
]
|
||||
})
|
||||
NODE_FILE = "BioxelNodes_4.1"
|
||||
|
||||
|
||||
custom_nodes = CustomNodes(
|
||||
menu_items=MENU_ITEMS,
|
||||
nodes_file=Path(__file__).parent/"assets/Nodes/BioxelNodes.blend",
|
||||
nodes_file=Path(__file__).parent / f"assets/Nodes/{NODE_FILE}.blend",
|
||||
root_label='Bioxel Nodes',
|
||||
root_icon="FILE_VOLUME",
|
||||
)
|
||||
|
||||
|
||||
def register():
|
||||
custom_nodes.register()
|
||||
|
||||
|
||||
def unregister():
|
||||
custom_nodes.unregister()
|
||||
|
||||
Reference in New Issue
Block a user