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>2020-12-17 23:43:01 +0300
committerHans Goudey <h.goudey@me.com>2020-12-17 23:43:01 +0300
commit23233fcf056e42958972d129ba526c0a103cf179 (patch)
tree311032616f27854496eb4137e29a1201491ac4cf /source/blender/makesdna/DNA_node_types.h
parentb10d8e330e529abb1cb017312b46a33ede24a8d0 (diff)
Cleanup: Use abstraction for attribute math node input
Since creating the attribute node, a helper function has been added to automatically get the input attribute or a constant value, depending on the "input type" values for the node. This commit replaces the specific implementation of that behavior with the new helper function. The versioning is necessary since the node now has a "storage" struct.
Diffstat (limited to 'source/blender/makesdna/DNA_node_types.h')
-rw-r--r--source/blender/makesdna/DNA_node_types.h16
1 files changed, 11 insertions, 5 deletions
diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h
index f33d40b1b5d..af91ab4f257 100644
--- a/source/blender/makesdna/DNA_node_types.h
+++ b/source/blender/makesdna/DNA_node_types.h
@@ -1085,6 +1085,17 @@ typedef struct NodeAttributeCompare {
char _pad[5];
} NodeAttributeCompare;
+typedef struct NodeAttributeMath {
+ /* e.g. NODE_MATH_ADD. */
+ uint8_t operation;
+
+ /* GeometryNodeAttributeInputMode */
+ uint8_t input_type_a;
+ uint8_t input_type_b;
+
+ char _pad[5];
+} NodeAttributeMath;
+
typedef struct NodeAttributeMix {
/* e.g. MA_RAMP_BLEND. */
uint8_t blend_type;
@@ -1499,11 +1510,6 @@ typedef enum GeometryNodeTriangulateQuads {
GEO_NODE_TRIANGULATE_QUAD_SHORTEDGE = 3,
} GeometryNodeTriangulateQuads;
-typedef enum GeometryNodeUseAttributeFlag {
- GEO_NODE_USE_ATTRIBUTE_A = (1 << 0),
- GEO_NODE_USE_ATTRIBUTE_B = (1 << 1),
-} GeometryNodeUseAttributeFlag;
-
typedef enum GeometryNodePointInstanceType {
GEO_NODE_POINT_INSTANCE_TYPE_OBJECT = 0,
GEO_NODE_POINT_INSTANCE_TYPE_COLLECTION = 1,