Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Goudey <h.goudey@me.com>2021-01-11 21:06:52 +0300
committerHans Goudey <h.goudey@me.com>2021-01-11 21:06:52 +0300
commitecdbd83a8d30b982c4280f0dbd8ed821c657fa25 (patch)
tree9ecb883d232d9b18d44af4451b20aacb3fda7207 /source/blender/makesdna/DNA_node_types.h
parent5bd822dc46f60da4b7de125f2d559fa16d781787 (diff)
Geometry Nodes: Attribute Vector Math Node
This patch implements the same operations and interface as the regular vector math node, but it runs for every element of the attribute. This should expand what's possible with geometry nodes quite a bit. Differential Revision: https://developer.blender.org/D9914
Diffstat (limited to 'source/blender/makesdna/DNA_node_types.h')
-rw-r--r--source/blender/makesdna/DNA_node_types.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h
index f5d27ef3164..70084f52753 100644
--- a/source/blender/makesdna/DNA_node_types.h
+++ b/source/blender/makesdna/DNA_node_types.h
@@ -1108,6 +1108,18 @@ typedef struct NodeAttributeMix {
uint8_t input_type_b;
} NodeAttributeMix;
+typedef struct NodeAttributeVectorMath {
+ /* NodeVectorMathOperation */
+ uint8_t operation;
+
+ /* GeometryNodeAttributeInputMode */
+ uint8_t input_type_a;
+ uint8_t input_type_b;
+ uint8_t input_type_c;
+
+ char _pad[4];
+} NodeAttributeVectorMath;
+
typedef struct NodeAttributeColorRamp {
ColorBand color_ramp;
} NodeAttributeColorRamp;
@@ -1368,7 +1380,7 @@ enum {
};
/* Vector Math node operations. */
-enum {
+typedef enum NodeVectorMathOperation {
NODE_VECTOR_MATH_ADD = 0,
NODE_VECTOR_MATH_SUBTRACT = 1,
NODE_VECTOR_MATH_MULTIPLY = 2,
@@ -1396,7 +1408,7 @@ enum {
NODE_VECTOR_MATH_SINE = 21,
NODE_VECTOR_MATH_COSINE = 22,
NODE_VECTOR_MATH_TANGENT = 23,
-};
+} NodeVectorMathOperation;
/* Boolean math node operations. */
enum {