[Bf-blender-cvs] [bfb2e87a9ea] master: Cleanup: Use shorter enum names

Hans Goudey noreply at git.blender.org
Tue Feb 23 06:33:11 CET 2021


Commit: bfb2e87a9ea0d8490cb5faec4d0d8a7066f0093a
Author: Hans Goudey
Date:   Mon Feb 22 23:33:04 2021 -0600
Branches: master
https://developer.blender.org/rBbfb2e87a9ea0d8490cb5faec4d0d8a7066f0093a

Cleanup: Use shorter enum names

With the full node name at the beginning, these names can get quite long.
Slightly different words shorten them just a bit.

===================================================================

M	source/blender/makesdna/DNA_node_types.h
M	source/blender/nodes/geometry/nodes/node_geo_point_distribute.cc

===================================================================

diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h
index e72e9632483..8b0bc235861 100644
--- a/source/blender/makesdna/DNA_node_types.h
+++ b/source/blender/makesdna/DNA_node_types.h
@@ -1203,7 +1203,7 @@ typedef struct NodeGeometryCollectionInfo {
 } NodeGeometryCollectionInfo;
 
 typedef struct NodeGeometryAttributeProximity {
-  /* GeometryNodeAttributeProximityTargetGeometryElement. */
+  /* GeometryNodeAttributeProximityTargetType. */
   uint8_t target_geometry_element;
 } NodeGeometryAttributeProximity;
 
@@ -1613,11 +1613,11 @@ typedef enum NodeShaderOutputTarget {
 
 /* Geometry Nodes */
 
-typedef enum GeometryNodeAttributeProximityTargetGeometryElement {
+typedef enum GeometryNodeAttributeProximityTargetType {
   GEO_NODE_ATTRIBUTE_PROXIMITY_TARGET_GEOMETRY_ELEMENT_POINTS = 0,
   GEO_NODE_ATTRIBUTE_PROXIMITY_TARGET_GEOMETRY_ELEMENT_EDGES = 1,
   GEO_NODE_ATTRIBUTE_PROXIMITY_TARGET_GEOMETRY_ELEMENT_FACES = 2,
-} GeometryNodeAttributeProximityTargetGeometryElement;
+} GeometryNodeAttributeProximityTargetType;
 
 /* Boolean Node */
 typedef enum GeometryNodeBooleanOperation {
@@ -1657,10 +1657,10 @@ typedef enum GeometryNodeAttributeInputMode {
   GEO_NODE_ATTRIBUTE_INPUT_INTEGER = 5,
 } GeometryNodeAttributeInputMode;
 
-typedef enum GeometryNodePointDistributeMethod {
+typedef enum GeometryNodePointDistributeMode {
   GEO_NODE_POINT_DISTRIBUTE_RANDOM = 0,
   GEO_NODE_POINT_DISTRIBUTE_POISSON = 1,
-} GeometryNodePointDistributeMethod;
+} GeometryNodePointDistributeMode;
 
 typedef enum GeometryNodeRotatePointsType {
   GEO_NODE_POINT_ROTATE_TYPE_EULER = 0,
diff --git a/source/blender/nodes/geometry/nodes/node_geo_point_distribute.cc b/source/blender/nodes/geometry/nodes/node_geo_point_distribute.cc
index 9b36090b6a0..553b8ea364f 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_point_distribute.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_point_distribute.cc
@@ -425,8 +425,8 @@ static void geo_node_point_distribute_exec(GeoNodeExecParams params)
   /* TODO: This node only needs read-only access to input instances. */
   geometry_set = geometry_set_realize_instances(geometry_set);
 
-  GeometryNodePointDistributeMethod distribute_method =
-      static_cast<GeometryNodePointDistributeMethod>(params.node().custom1);
+  GeometryNodePointDistributeMode distribute_method = static_cast<GeometryNodePointDistributeMode>(
+      params.node().custom1);
 
   if (!geometry_set.has_mesh()) {
     params.error_message_add(NodeWarningType::Error, "Geometry must contain a mesh.");



More information about the Bf-blender-cvs mailing list