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 <montagne29@wanadoo.fr>2018-04-17 13:12:35 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2018-04-17 13:12:35 +0300
commit2408a482c032e4df9c091f9fa854785bb08963b3 (patch)
tree3ce4727404c157a7e69afd53d484f8b733b1eb91 /source/blender/makesrna/intern/rna_access.c
parent963b1c8e41edd6cfd400b1e1e19d073d88378013 (diff)
parentaff71a7fdced77a29a44124f8caae191b27ac91d (diff)
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/makesrna/intern/rna_access.c')
-rw-r--r--source/blender/makesrna/intern/rna_access.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c
index 4a267313ac9..f7733957de9 100644
--- a/source/blender/makesrna/intern/rna_access.c
+++ b/source/blender/makesrna/intern/rna_access.c
@@ -284,8 +284,9 @@ IDProperty *RNA_struct_idprops(PointerRNA *ptr, bool create)
{
StructRNA *type = ptr->type;
- if (type && type->idproperties)
+ if (type && type->idproperties) {
return type->idproperties(ptr, create);
+ }
return NULL;
}
@@ -299,8 +300,16 @@ static IDProperty *rna_idproperty_find(PointerRNA *ptr, const char *name)
{
IDProperty *group = RNA_struct_idprops(ptr, 0);
- if (group)
- return IDP_GetPropertyFromGroup(group, name);
+ if (group) {
+ if (group->type == IDP_GROUP) {
+ return IDP_GetPropertyFromGroup(group, name);
+ }
+ else {
+ /* Not sure why that happens sometimes, with nested properties... */
+ /* Seems to be actually array prop, name is usually "0"... To be sorted out later. */
+// printf("Got unexpected IDProp container when trying to retrieve %s: %d\n", name, group->type);
+ }
+ }
return NULL;
}