diff options
author | Hans Goudey <h.goudey@me.com> | 2021-01-26 21:57:31 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2021-01-26 21:57:31 +0300 |
commit | 1c4b0c47dd476c424b750edd4dadf977937fee85 (patch) | |
tree | a16236e0f97d267b4a183658484ea692b060be34 /source/blender/makesdna | |
parent | de3f369b30e5d08415b8cff14e462ec6d18689ea (diff) |
Geometry Nodes: Support all operations in the "Attribute Math" node
This adds the ability to use all the math operations in the regular
utility "Math" node. The code is quite similar to the attribute vector
math node, with the simplification that the result is always a float.
Differential Revision: https://developer.blender.org/D10199
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r-- | source/blender/makesdna/DNA_node_types.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h index e26a2861f04..0c92099e23b 100644 --- a/source/blender/makesdna/DNA_node_types.h +++ b/source/blender/makesdna/DNA_node_types.h @@ -1089,14 +1089,15 @@ typedef struct NodeAttributeCompare { } NodeAttributeCompare; typedef struct NodeAttributeMath { - /* e.g. NODE_MATH_ADD. */ + /* NodeMathOperation. */ uint8_t operation; /* GeometryNodeAttributeInputMode */ uint8_t input_type_a; uint8_t input_type_b; + uint8_t input_type_c; - char _pad[5]; + char _pad[4]; } NodeAttributeMath; typedef struct NodeAttributeMix { @@ -1387,7 +1388,7 @@ enum { #define SHD_MATH_CLAMP 1 /* Math node operations. */ -enum { +typedef enum NodeMathOperation { NODE_MATH_ADD = 0, NODE_MATH_SUBTRACT = 1, NODE_MATH_MULTIPLY = 2, @@ -1428,7 +1429,7 @@ enum { NODE_MATH_PINGPONG = 37, NODE_MATH_SMOOTH_MIN = 38, NODE_MATH_SMOOTH_MAX = 39, -}; +} NodeMathOperation; /* Vector Math node operations. */ typedef enum NodeVectorMathOperation { |