[Bf-blender-cvs] [0e0d99161ac] master: RNA: move enums to rna_rna.c
Campbell Barton
noreply at git.blender.org
Thu May 17 19:12:04 CEST 2018
Commit: 0e0d99161ac60642edcaf0e9795a5ecac02bfbd6
Author: Campbell Barton
Date: Thu May 17 19:10:45 2018 +0200
Branches: master
https://developer.blender.org/rB0e0d99161ac60642edcaf0e9795a5ecac02bfbd6
RNA: move enums to rna_rna.c
Needed for use in rna non runtime code.
===================================================================
M source/blender/makesrna/intern/rna_access.c
M source/blender/makesrna/intern/rna_rna.c
===================================================================
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c
index 80e377ad8e1..c0871baca45 100644
--- a/source/blender/makesrna/intern/rna_access.c
+++ b/source/blender/makesrna/intern/rna_access.c
@@ -1385,17 +1385,6 @@ int RNA_property_pointer_poll(PointerRNA *ptr, PropertyRNA *prop, PointerRNA *va
return 0;
}
-/* Reuse for dynamic types */
-const EnumPropertyItem DummyRNA_NULL_items[] = {
- {0, NULL, 0, NULL, NULL}
-};
-
-/* Reuse for dynamic types with default value */
-const EnumPropertyItem DummyRNA_DEFAULT_items[] = {
- {0, "DEFAULT", 0, "Default", ""},
- {0, NULL, 0, NULL, NULL}
-};
-
void RNA_property_enum_items_ex(
bContext *C, PointerRNA *ptr, PropertyRNA *prop, const bool use_static,
const EnumPropertyItem **r_item, int *r_totitem, bool *r_free)
diff --git a/source/blender/makesrna/intern/rna_rna.c b/source/blender/makesrna/intern/rna_rna.c
index b1b7965286f..5b55d149b24 100644
--- a/source/blender/makesrna/intern/rna_rna.c
+++ b/source/blender/makesrna/intern/rna_rna.c
@@ -36,6 +36,28 @@
#include "rna_internal.h"
+/* -------------------------------------------------------------------- */
+/** \name Generic Enum's
+ * \{ */
+
+/* Reuse for dynamic types */
+const EnumPropertyItem DummyRNA_NULL_items[] = {
+ {0, NULL, 0, NULL, NULL}
+};
+
+/* Reuse for dynamic types with default value */
+const EnumPropertyItem DummyRNA_DEFAULT_items[] = {
+ {0, "DEFAULT", 0, "Default", ""},
+ {0, NULL, 0, NULL, NULL}
+};
+
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name RNA Enum's
+ * \{ */
+
+
const EnumPropertyItem rna_enum_property_type_items[] = {
{PROP_BOOLEAN, "BOOLEAN", 0, "Boolean", ""},
{PROP_INT, "INT", 0, "Integer", ""},
@@ -103,6 +125,8 @@ const EnumPropertyItem rna_enum_property_unit_items[] = {
{0, NULL, 0, NULL, NULL}
};
+/** \} */
+
#ifdef RNA_RUNTIME
#include "MEM_guardedalloc.h"
#include "BLI_ghash.h"
More information about the Bf-blender-cvs
mailing list