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:
authorBastien Montagne <bastien@blender.org>2020-05-22 16:12:46 +0300
committerBastien Montagne <bastien@blender.org>2020-05-22 16:41:34 +0300
commit1633a65d413b9de543742cc47438e650ac665edc (patch)
tree06d72d8580ea204c2dfb30d6c988ab8f75c7a726 /source/blender/makesrna/intern/rna_access.c
parent920b6987466da30b53b2c923baf1096f312e64a9 (diff)
RNA: Make enum properties compatible with raw access.
This will allow to use foreach_get/set on enums of RNA collection items, which can save a lot of time in some cases (see incoming FBX updates).
Diffstat (limited to 'source/blender/makesrna/intern/rna_access.c')
-rw-r--r--source/blender/makesrna/intern/rna_access.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c
index 85892758a88..f14e81a38df 100644
--- a/source/blender/makesrna/intern/rna_access.c
+++ b/source/blender/makesrna/intern/rna_access.c
@@ -4386,8 +4386,8 @@ static int rna_raw_access(ReportList *reports,
/* check type */
itemtype = RNA_property_type(itemprop);
- if (!ELEM(itemtype, PROP_BOOLEAN, PROP_INT, PROP_FLOAT)) {
- BKE_report(reports, RPT_ERROR, "Only boolean, int and float properties supported");
+ if (!ELEM(itemtype, PROP_BOOLEAN, PROP_INT, PROP_FLOAT, PROP_ENUM)) {
+ BKE_report(reports, RPT_ERROR, "Only boolean, int float and enum properties supported");
return 0;
}