[Bf-blender-cvs] [1de5081252b] temp-geometry-nodes-mix-attributes: follow code style
Jacques Lucke
noreply at git.blender.org
Wed Dec 9 16:48:18 CET 2020
Commit: 1de5081252bd774cdb357a1b5b5ba508b3227ebb
Author: Jacques Lucke
Date: Wed Dec 9 15:16:26 2020 +0100
Branches: temp-geometry-nodes-mix-attributes
https://developer.blender.org/rB1de5081252bd774cdb357a1b5b5ba508b3227ebb
follow code style
===================================================================
M source/blender/makesdna/DNA_node_types.h
M source/blender/makesrna/intern/rna_nodetree.c
M source/blender/nodes/geometry/nodes/node_geo_attribute_mix.cc
===================================================================
diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h
index b4ca65403ae..b8aeaa2bd89 100644
--- a/source/blender/makesdna/DNA_node_types.h
+++ b/source/blender/makesdna/DNA_node_types.h
@@ -1475,10 +1475,10 @@ typedef enum GeometryNodeUseAttributeFlag {
} GeometryNodeUseAttributeFlag;
typedef enum GeometryNodeAttributeInputMode {
- GEO_NODE_ATTRIBUTE_INPUT__ATTRIBUTE = 0,
- GEO_NODE_ATTRIBUTE_INPUT__FLOAT = 1,
- GEO_NODE_ATTRIBUTE_INPUT__VECTOR = 2,
- GEO_NODE_ATTRIBUTE_INPUT__COLOR = 3,
+ GEO_NODE_ATTRIBUTE_INPUT_ATTRIBUTE = 0,
+ GEO_NODE_ATTRIBUTE_INPUT_FLOAT = 1,
+ GEO_NODE_ATTRIBUTE_INPUT_VECTOR = 2,
+ GEO_NODE_ATTRIBUTE_INPUT_COLOR = 3,
} GeometryNodeAttributeInputMode;
#ifdef __cplusplus
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c
index 38ad3f76f2a..8836e2b9527 100644
--- a/source/blender/makesrna/intern/rna_nodetree.c
+++ b/source/blender/makesrna/intern/rna_nodetree.c
@@ -436,16 +436,16 @@ static const EnumPropertyItem rna_node_geometry_attribute_input_b_items[] = {
};
static const EnumPropertyItem rna_node_geometry_attribute_factor_input_type_items[] = {
- {GEO_NODE_ATTRIBUTE_INPUT__ATTRIBUTE, "ATTRIBUTE", 0, "Attribute", ""},
- {GEO_NODE_ATTRIBUTE_INPUT__FLOAT, "FLOAT", 0, "Float", ""},
+ {GEO_NODE_ATTRIBUTE_INPUT_ATTRIBUTE, "ATTRIBUTE", 0, "Attribute", ""},
+ {GEO_NODE_ATTRIBUTE_INPUT_FLOAT, "FLOAT", 0, "Float", ""},
{0, NULL, 0, NULL, NULL},
};
static const EnumPropertyItem rna_node_geometry_attribute_input_type_items[] = {
- {GEO_NODE_ATTRIBUTE_INPUT__ATTRIBUTE, "ATTRIBUTE", 0, "Attribute", ""},
- {GEO_NODE_ATTRIBUTE_INPUT__FLOAT, "FLOAT", 0, "Float", ""},
- {GEO_NODE_ATTRIBUTE_INPUT__VECTOR, "VECTOR", 0, "Vector", ""},
- {GEO_NODE_ATTRIBUTE_INPUT__COLOR, "COLOR", 0, "Color", ""},
+ {GEO_NODE_ATTRIBUTE_INPUT_ATTRIBUTE, "ATTRIBUTE", 0, "Attribute", ""},
+ {GEO_NODE_ATTRIBUTE_INPUT_FLOAT, "FLOAT", 0, "Float", ""},
+ {GEO_NODE_ATTRIBUTE_INPUT_VECTOR, "VECTOR", 0, "Vector", ""},
+ {GEO_NODE_ATTRIBUTE_INPUT_COLOR, "COLOR", 0, "Color", ""},
{0, NULL, 0, NULL, NULL},
};
diff --git a/source/blender/nodes/geometry/nodes/node_geo_attribute_mix.cc b/source/blender/nodes/geometry/nodes/node_geo_attribute_mix.cc
index 1f1f3298e71..19fcd298f42 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_attribute_mix.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_attribute_mix.cc
@@ -170,9 +170,9 @@ static void geo_node_attribute_mix_init(bNodeTree *UNUSED(ntree), bNode *node)
NodeAttributeMix *data = (NodeAttributeMix *)MEM_callocN(sizeof(NodeAttributeMix),
"attribute mix node");
data->blend_type = MA_RAMP_BLEND;
- data->input_type_factor = GEO_NODE_ATTRIBUTE_INPUT__FLOAT;
- data->input_type_a = GEO_NODE_ATTRIBUTE_INPUT__ATTRIBUTE;
- data->input_type_b = GEO_NODE_ATTRIBUTE_INPUT__ATTRIBUTE;
+ data->input_type_factor = GEO_NODE_ATTRIBUTE_INPUT_FLOAT;
+ data->input_type_a = GEO_NODE_ATTRIBUTE_INPUT_ATTRIBUTE;
+ data->input_type_b = GEO_NODE_ATTRIBUTE_INPUT_ATTRIBUTE;
node->storage = data;
}
@@ -184,10 +184,10 @@ static void update_attribute_input_socket_availabilities(bNode &node,
LISTBASE_FOREACH (bNodeSocket *, socket, &node.inputs) {
if (name == socket->name) {
const bool is_available =
- ((socket->type == SOCK_STRING && mode_ == GEO_NODE_ATTRIBUTE_INPUT__ATTRIBUTE) ||
- (socket->type == SOCK_FLOAT && mode_ == GEO_NODE_ATTRIBUTE_INPUT__FLOAT) ||
- (socket->type == SOCK_VECTOR && mode_ == GEO_NODE_ATTRIBUTE_INPUT__VECTOR) ||
- (socket->type == SOCK_RGBA && mode_ == GEO_NODE_ATTRIBUTE_INPUT__COLOR));
+ ((socket->type == SOCK_STRING && mode_ == GEO_NODE_ATTRIBUTE_INPUT_ATTRIBUTE) ||
+ (socket->type == SOCK_FLOAT && mode_ == GEO_NODE_ATTRIBUTE_INPUT_FLOAT) ||
+ (socket->type == SOCK_VECTOR && mode_ == GEO_NODE_ATTRIBUTE_INPUT_VECTOR) ||
+ (socket->type == SOCK_RGBA && mode_ == GEO_NODE_ATTRIBUTE_INPUT_COLOR));
nodeSetSocketAvailability(socket, is_available);
}
}
More information about the Bf-blender-cvs
mailing list