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-02-12 22:25:45 +0300
committerHans Goudey <h.goudey@me.com>2021-02-12 22:25:45 +0300
commitd4fd06d6ce89113310bb769f4777c9a4d77cb155 (patch)
treef94c3e05a65bca55a0e54f4c1fb72d9e23734e17 /source/blender/makesdna/DNA_node_types.h
parentd7c2c889a688067dab280fc137ad4c3c7ce4cb2b (diff)
Geometry Nodes: Add operation setting to attribute randomize node
This commit adds a drop-down to the attribute randomize node to support a few operations on the values of existing attributes: "Replace/Create" (the existing behavior), "Add", "Subtract", and "Multiply". At this point, the operations are limited by what is simple to implement. More could be added in the future, but there isn't a strong use case for more complex operations anyway, and a second math node can be used. Differential Revision: https://developer.blender.org/D10269
Diffstat (limited to 'source/blender/makesdna/DNA_node_types.h')
-rw-r--r--source/blender/makesdna/DNA_node_types.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h
index 43c5fa81651..fd9fcfa3232 100644
--- a/source/blender/makesdna/DNA_node_types.h
+++ b/source/blender/makesdna/DNA_node_types.h
@@ -1109,6 +1109,16 @@ typedef struct NodeAttributeMix {
uint8_t input_type_b;
} NodeAttributeMix;
+typedef struct NodeAttributeRandomize {
+ /* CustomDataType. */
+ uint8_t data_type;
+ /* AttributeDomain. */
+ uint8_t domain;
+ /* GeometryNodeAttributeRandomizeMode. */
+ uint8_t operation;
+ char _pad[1];
+} NodeAttributeRandomize;
+
typedef struct NodeAttributeVectorMath {
/* NodeVectorMathOperation */
uint8_t operation;
@@ -1637,6 +1647,7 @@ typedef enum GeometryNodeAttributeInputMode {
GEO_NODE_ATTRIBUTE_INPUT_VECTOR = 2,
GEO_NODE_ATTRIBUTE_INPUT_COLOR = 3,
GEO_NODE_ATTRIBUTE_INPUT_BOOLEAN = 4,
+ GEO_NODE_ATTRIBUTE_INPUT_INTEGER = 5,
} GeometryNodeAttributeInputMode;
typedef enum GeometryNodePointDistributeMethod {
@@ -1649,6 +1660,13 @@ typedef enum GeometryNodeRotatePointsType {
GEO_NODE_POINT_ROTATE_TYPE_AXIS_ANGLE = 1,
} GeometryNodeRotatePointsType;
+typedef enum GeometryNodeAttributeRandomizeMode {
+ GEO_NODE_ATTRIBUTE_RANDOMIZE_REPLACE_CREATE = 0,
+ GEO_NODE_ATTRIBUTE_RANDOMIZE_ADD = 1,
+ GEO_NODE_ATTRIBUTE_RANDOMIZE_SUBTRACT = 2,
+ GEO_NODE_ATTRIBUTE_RANDOMIZE_MULTIPLY = 3,
+} GeometryNodeAttributeRandomizeMode;
+
typedef enum GeometryNodeRotatePointsSpace {
GEO_NODE_POINT_ROTATE_SPACE_OBJECT = 0,
GEO_NODE_POINT_ROTATE_SPACE_POINT = 1,