[Bf-blender-cvs] [2f60e5d1b56] blender-v2.92-release: Cleanup: Move geonodes object info RNA enum

Dalai Felinto noreply at git.blender.org
Thu Jan 28 22:59:07 CET 2021


Commit: 2f60e5d1b56dfb8c9104f4652e5cfa5914e58bd7
Author: Dalai Felinto
Date:   Thu Jan 28 22:44:20 2021 +0100
Branches: blender-v2.92-release
https://developer.blender.org/rB2f60e5d1b56dfb8c9104f4652e5cfa5914e58bd7

Cleanup: Move geonodes object info RNA enum

This enum is only used by the node. So it does not need to be declared outside
the scope of its function.

Originally I thought this may be relevant to the collection info node as well,
but the patch for it is defining its own enums.

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

M	source/blender/makesrna/intern/rna_nodetree.c

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

diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c
index 1cd3593e4a4..5afc892820c 100644
--- a/source/blender/makesrna/intern/rna_nodetree.c
+++ b/source/blender/makesrna/intern/rna_nodetree.c
@@ -494,22 +494,6 @@ static const EnumPropertyItem rna_node_geometry_attribute_input_type_items_no_bo
     {0, NULL, 0, NULL, NULL},
 };
 
-static const EnumPropertyItem rna_node_geometry_object_info_transform_space_items[] = {
-    {GEO_NODE_TRANSFORM_SPACE_ORIGINAL,
-     "ORIGINAL",
-     0,
-     "Original",
-     "Output the geometry relative to the input object transform, and the location, rotation and "
-     "scale relative to the world origin"},
-    {GEO_NODE_TRANSFORM_SPACE_RELATIVE,
-     "RELATIVE",
-     0,
-     "Relative",
-     "Bring the input object geometry, location, rotation and scale into the modified object, "
-     "maintaining the relative position between the two objects in the scene"},
-    {0, NULL, 0, NULL, NULL},
-};
-
 #endif
 
 #undef ITEM_ATTRIBUTE
@@ -8866,6 +8850,23 @@ static void def_geo_object_info(StructRNA *srna)
 {
   PropertyRNA *prop;
 
+  static const EnumPropertyItem rna_node_geometry_object_info_transform_space_items[] = {
+      {GEO_NODE_TRANSFORM_SPACE_ORIGINAL,
+       "ORIGINAL",
+       0,
+       "Original",
+       "Output the geometry relative to the input object transform, and the location, rotation "
+       "and "
+       "scale relative to the world origin"},
+      {GEO_NODE_TRANSFORM_SPACE_RELATIVE,
+       "RELATIVE",
+       0,
+       "Relative",
+       "Bring the input object geometry, location, rotation and scale into the modified object, "
+       "maintaining the relative position between the two objects in the scene"},
+      {0, NULL, 0, NULL, NULL},
+  };
+
   RNA_def_struct_sdna_from(srna, "NodeGeometryObjectInfo", "storage");
 
   prop = RNA_def_property(srna, "transform_space", PROP_ENUM, PROP_NONE);



More information about the Bf-blender-cvs mailing list