diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-01-25 08:45:21 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-01-25 08:45:21 +0300 |
commit | 17509e733429bdcc3a6131a775d2d73252b6bb88 (patch) | |
tree | ad6a556a194052815e0b9a0f63d43b9331b3df55 /source/blender/makesrna | |
parent | 27cb6218a34a440a83c3b275e3cf69ea79245a1e (diff) |
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.
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_rna.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/source/blender/makesrna/intern/rna_rna.c b/source/blender/makesrna/intern/rna_rna.c index ec037ce59fa..d0a4647efc3 100644 --- a/source/blender/makesrna/intern/rna_rna.c +++ b/source/blender/makesrna/intern/rna_rna.c @@ -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)); |