diff --git a/molecularnodes/__init__.py b/molecularnodes/__init__.py index 7f182f77..3ac5213c 100644 --- a/molecularnodes/__init__.py +++ b/molecularnodes/__init__.py @@ -17,7 +17,7 @@ from .io.parse.mda import _rejuvenate_universe, _sync_universe from .io.parse.star import _rehydrate_ensembles from .props import MolecularNodesObjectProperties -from .ui.node_menu import MN_add_node_menu, draw_node_menus +from .ui.node_menu import MN_add_node_menu, draw_node_menus, CLASSES from .ui.ops import ops_ui from .ui.panel import MN_PT_panel, change_style_menu, change_style_node_menu from .ui.pref import MN_OT_Install_Template @@ -26,6 +26,7 @@ ops_ui + ops_io + [MN_OT_Install_Template, MolecularNodesObjectProperties, MN_PT_panel] + + CLASSES ) universe_funcs = [_sync_universe, _rejuvenate_universe] diff --git a/molecularnodes/assets/MN_data_file_4.2.blend b/molecularnodes/assets/MN_data_file_4.2.blend index e98b71f8..9ed9df03 100644 Binary files a/molecularnodes/assets/MN_data_file_4.2.blend and b/molecularnodes/assets/MN_data_file_4.2.blend differ diff --git a/molecularnodes/ui/func.py b/molecularnodes/ui/func.py index ee04447a..2b4fed01 100644 --- a/molecularnodes/ui/func.py +++ b/molecularnodes/ui/func.py @@ -9,6 +9,7 @@ def build_menu(layout, items): layout.separator() elif item["label"] == "custom": for button in item["values"]: + print(f"{button=}") item["function"]( layout, label=button["label"], diff --git a/molecularnodes/ui/node_menu.py b/molecularnodes/ui/node_menu.py index 7530fa67..2f1b47d2 100644 --- a/molecularnodes/ui/node_menu.py +++ b/molecularnodes/ui/node_menu.py @@ -135,3 +135,19 @@ def MN_add_node_menu(self, context): if "GeometryNodeTree" == bpy.context.area.spaces[0].tree_type: layout = self.layout layout.menu("MN_MT_NODE", text="Molecular Nodes", icon_value=88) + + +CLASSES = [ + MN_MT_Node, + MN_MT_Node_Animate, + MN_MT_Node_Assembly, + MN_MT_Node_Bonds, + MN_MT_Node_CellPack, + MN_MT_Node_Color, + MN_MT_Node_Density, + MN_MT_Node_DNA, + MN_MT_Node_Style, + MN_MT_Node_Select, + MN_MT_Node_Topology, + MN_MT_Node_Utils, +] diff --git a/molecularnodes/ui/ops.py b/molecularnodes/ui/ops.py index 28c9c5bb..ca119604 100644 --- a/molecularnodes/ui/ops.py +++ b/molecularnodes/ui/ops.py @@ -170,4 +170,6 @@ def execute(self, context): MN_OT_Add_Custom_Node_Group, MN_OT_Residues_Selection_Custom, MN_OT_Change_Style, + MN_OT_Assembly_Bio, + MN_OT_iswitch_custom, ] diff --git a/tests/test_nodes.py b/tests/test_nodes.py index 25b0b83f..d127a0db 100644 --- a/tests/test_nodes.py +++ b/tests/test_nodes.py @@ -243,13 +243,13 @@ def test_node_topology(snapshot_custom: NumpySnapshotExtension): for node_name in node_names: # exclude these particular nodes, as they aren't field nodes and so we shouldn't # be testing them here. Will create their own particular tests later - if "backbone" in node_name or "bonds" in node_name: + if "Backbone" in node_name or "Bonds" in node_name: continue node_topo = nodes.add_custom( group, node_name, location=[x - 300 for x in node_att.location] ) - if node_name == "MN_topo_point_mask": + if node_name == "Point Group Mask": node_topo.inputs["atom_name"].default_value = 61 type_to_data_type = { @@ -294,7 +294,7 @@ def test_compute_backbone(snapshot_custom: NumpySnapshotExtension): group, node_name, location=[x - 300 for x in node_att.location] ) - if node_name == "MN_topo_point_mask": + if node_name == "Point Group Mask": node_topo.inputs["atom_name"].default_value = 61 type_to_data_type = {