Skip to content

Commit

Permalink
Geometry Nodes - Input - Constant - New Rotation node #4261
Browse files Browse the repository at this point in the history
  • Loading branch information
ReinerBforartists committed May 24, 2024
1 parent 1de89f8 commit 9fd4466
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 8 deletions.
18 changes: 13 additions & 5 deletions release/datafiles/blender_icons.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
8 changes: 8 additions & 0 deletions scripts/startup/bl_ui/space_node_toolshelf.py
Original file line number Diff line number Diff line change
Expand Up @@ -3590,6 +3590,10 @@ def draw(self, context):
props = col.operator("node.add_node", text=" Material ", icon = "NODE_MATERIAL")
props.use_transform = True
props.type = "GeometryNodeInputMaterial"

props = col.operator("node.add_node", text=" Rotation ", icon = "ROTATION")
props.use_transform = True
props.type = "FunctionNodeInputRotation"

props = col.operator("node.add_node", text=" String ", icon = "STRING")
props.use_transform = True
Expand Down Expand Up @@ -3631,6 +3635,10 @@ def draw(self, context):
props = flow.operator("node.add_node", text = "", icon = "NODE_MATERIAL")
props.use_transform = True
props.type = "GeometryNodeInputMaterial"

props = flow.operator("node.add_node", text="", icon = "ROTATION")
props.use_transform = True
props.type = "FunctionNodeInputRotation"

props = flow.operator("node.add_node", text = "", icon = "STRING")
props.use_transform = True
Expand Down
2 changes: 1 addition & 1 deletion source/blender/editors/datafiles/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2223,7 +2223,7 @@ index_switch
bake
line_show
line_hide
#~ DEF_ICON_BLANK(2243)
rotation
#~ DEF_ICON_BLANK(2244)
collection_bone_remove

Expand Down
2 changes: 1 addition & 1 deletion source/blender/editors/include/UI_icons.hh
Original file line number Diff line number Diff line change
Expand Up @@ -2240,7 +2240,7 @@ DEF_ICON_COLOR(INDEX_SWITCH)
DEF_ICON_COLOR(BAKE)
DEF_ICON_COLOR(LINE_SHOW)
DEF_ICON_COLOR(LINE_HIDE)
DEF_ICON_BLANK(2243)
DEF_ICON_COLOR(ROTATION)
DEF_ICON_BLANK(2244)
DEF_ICON_COLOR(COLLECTION_BONE_REMOVE)

Expand Down
3 changes: 3 additions & 0 deletions source/blender/makesrna/intern/rna_nodetree.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11357,6 +11357,9 @@ static int node_type_to_icon(int type)
case FN_NODE_INPUT_INT:
return ICON_INTEGER;

case FN_NODE_INPUT_ROTATION:
return ICON_ROTATION;

case FN_NODE_INPUT_SPECIAL_CHARACTERS:
return ICON_SPECIAL;

Expand Down
2 changes: 1 addition & 1 deletion source/blender/nodes/NOD_static_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ DefNode(FunctionNode, FN_NODE_FLOAT_TO_INT, def_float_to_int, "FLOAT_TO_INT",
DefNode(FunctionNode, FN_NODE_INPUT_BOOL, def_fn_input_bool, "INPUT_BOOL", InputBool, "Boolean", "Add a Boolean Function node\nAdds a boolean that can be on or off")
DefNode(FunctionNode, FN_NODE_INPUT_COLOR, def_fn_input_color, "INPUT_COLOR", InputColor, "Color", "Add a Color Function node\nAdds a color picker that allows you to set a color")
DefNode(FunctionNode, FN_NODE_INPUT_INT, def_fn_input_int, "INPUT_INT", InputInt, "Integer", "Add a Integer Function node\nAllows to add a integer number")
DefNode(FunctionNode, FN_NODE_INPUT_ROTATION, def_fn_input_rotation, "INPUT_ROTATION", InputRotation, "Rotation", "")
DefNode(FunctionNode, FN_NODE_INPUT_ROTATION, def_fn_input_rotation, "INPUT_ROTATION", InputRotation, "Rotation", "Add a Rotation Function node\nAllows a constant rotation")
DefNode(FunctionNode, FN_NODE_INPUT_SPECIAL_CHARACTERS, 0, "INPUT_SPECIAL_CHARACTERS", InputSpecialCharacters, "Special Characters", "Add a Special Character Function node\nAdd special characters")
DefNode(FunctionNode, FN_NODE_INPUT_STRING, def_fn_input_string, "INPUT_STRING", InputString, "String", "Add a String Function node\nAdds a string")
DefNode(FunctionNode, FN_NODE_INPUT_VECTOR, def_fn_input_vector, "INPUT_VECTOR", InputVector, "Vector", "Add a Vector Function Function node\nCreates a single vector of three values that can be used as an input")
Expand Down

0 comments on commit 9fd4466

Please sign in to comment.