Merge branch 'master' into blender2.8
This commit is contained in:
commit
2408a482c0
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue