Skip to content

Commit

Permalink
rename initial starting set color node
Browse files Browse the repository at this point in the history
  • Loading branch information
BradyAJohnston committed Apr 29, 2023
1 parent e470239 commit fd06965
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 12 deletions.
Binary file modified MolecularNodes/assets/node_append_file.blend
Binary file not shown.
10 changes: 1 addition & 9 deletions MolecularNodes/nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,22 +230,14 @@ def create_starting_node_tree(obj, coll_frames, starting_style = "atoms"):
node_group = gn_new_group_empty("MOL_" + str(obj.name))
node_mod.node_group = node_group

# TODO check if can delete this loop
# ensure the required setup nodes either already exist or append them
# required_setup_nodes = ['MOL_prop_setup', 'MOL_style_color']
# if n_frames > 1:
# required_setup_nodes = ['MOL_prop_setup', 'MOL_style_color', 'MOL_animate', 'MOL_animate_frames']
# for node_group in required_setup_nodes:
# mol_append_node(node_group)

# move the input and output nodes for the group
node_input = node_mod.node_group.nodes[bpy.app.translations.pgettext_data("Group Input",)]
node_input.location = [0, 0]
node_output = node_mod.node_group.nodes[bpy.app.translations.pgettext_data("Group Output",)]
node_output.location = [800, 0]

# node_properties = add_custom_node_group(node_group, 'MOL_prop_setup', [0, 0])
node_colour = add_custom_node_group(node_mod, 'MOL_style_color', [200, 0])
node_colour = add_custom_node_group(node_mod, 'MOL_color_set_common', [200, 0])

node_random_colour = node_group.nodes.new("FunctionNodeRandomValue")
node_random_colour.data_type = 'FLOAT_VECTOR'
Expand Down
6 changes: 3 additions & 3 deletions MolecularNodes/ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -786,6 +786,9 @@ def draw(self, context):
layout.operator_context = "INVOKE_DEFAULT"
menu_item_interface(layout, 'Set Color', 'MOL_color_set',
"Sets a new color for the selected atoms")
menu_item_interface(layout, 'Set Color Common', 'MOL_color_set_common',
"Choose a color for the most common elements in PDB \
structures")
layout.separator()
menu_item_interface(layout, 'Goodsell Colors', 'MOL_color_goodsell',
"Adjusts the given colors to copy the 'Goodsell Style'.\n \
Expand All @@ -800,9 +803,6 @@ def draw(self, context):
menu_item_interface(layout, 'Color by Element', 'MOL_color_element',
"Choose a color for each of the first 20 elements")
menu_item_color_chains(layout, 'Color by Chains')
menu_item_interface(layout, 'Color Atomic', 'MOL_style_color',
"Choose a color for the most common elements in PDB \
structures")

class MOL_MT_Add_Node_Menu_Bonds(bpy.types.Menu):
bl_idname = 'MOL_MT_ADD_NODE_MENU_BONDS'
Expand Down

0 comments on commit fd06965

Please sign in to comment.