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:
Diffstat (limited to 'source/blender/makesrna/intern/rna_define.c')
-rw-r--r--source/blender/makesrna/intern/rna_define.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_define.c b/source/blender/makesrna/intern/rna_define.c
index 55c97672958..8932639d1ac 100644
--- a/source/blender/makesrna/intern/rna_define.c
+++ b/source/blender/makesrna/intern/rna_define.c
@@ -1819,6 +1819,23 @@ void RNA_def_property_struct_runtime(PropertyRNA *prop, StructRNA *type)
}
}
+void RNA_def_property_enum_native_type(PropertyRNA *prop, const char *native_enum_type)
+{
+ StructRNA *srna = DefRNA.laststruct;
+ switch (prop->type) {
+ case PROP_ENUM: {
+ EnumPropertyRNA *eprop = (EnumPropertyRNA *)prop;
+ eprop->native_enum_type = native_enum_type;
+ break;
+ }
+ default:
+ CLOG_ERROR(
+ &LOG, "\"%s.%s\", invalid type for struct type.", srna->identifier, prop->identifier);
+ DefRNA.error = 1;
+ break;
+ }
+}
+
void RNA_def_property_enum_items(PropertyRNA *prop, const EnumPropertyItem *item)
{
StructRNA *srna = DefRNA.laststruct;