property lookups on structs was doing a listbase search even if the hash was defined.

since the property hash is maintained there is no reason for this, especially since the property could be in the StructRNA's parent class.
This commit is contained in:
Campbell Barton
2011-01-25 05:45:21 +00:00
parent 27cb6218a3
commit 17509e7334

View File

@@ -321,14 +321,15 @@ int rna_builtin_properties_lookup_string(PointerRNA *ptr, const char *key, Point
return TRUE;
}
}
else {
for(prop=srna->cont.properties.first; prop; prop=prop->next) {
if(!(prop->flag & PROP_BUILTIN) && strcmp(prop->identifier, key)==0) {
propptr.type= &RNA_Property;
propptr.data= prop;
for(prop=srna->cont.properties.first; prop; prop=prop->next) {
if(!(prop->flag & PROP_BUILTIN) && strcmp(prop->identifier, key)==0) {
propptr.type= &RNA_Property;
propptr.data= prop;
*r_ptr= propptr;
return TRUE;
*r_ptr= propptr;
return TRUE;
}
}
}
} while((srna=srna->base));