diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-03-30 21:31:37 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-03-30 21:31:37 +0400 |
commit | fe33fb23d9c4ba4951e8db080363777fd0db8949 (patch) | |
tree | af4b73242d3ef069375dd6b7dde750d6a86bbdd1 /source/blender/makesrna/intern/rna_access.c | |
parent | 5e4242dab0d06a5831d02cb750883b196a6d32f8 (diff) |
UI:
* Added support for RNA pointer buttons. It's like the existing
ID pointer buttons but with an icon, and autocomplete works.
There's some drawing issues currently but don't want to
interfere with the refactoring here. Also todo is support for
things like vertex groups or bones.
Diffstat (limited to 'source/blender/makesrna/intern/rna_access.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_access.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c index 3fcc2d18487..52b1b77ddf0 100644 --- a/source/blender/makesrna/intern/rna_access.c +++ b/source/blender/makesrna/intern/rna_access.c @@ -457,13 +457,20 @@ int RNA_property_string_maxlength(PointerRNA *ptr, PropertyRNA *prop) StructRNA *RNA_property_pointer_type(PointerRNA *ptr, PropertyRNA *prop) { - PointerPropertyRNA *pprop; - rna_idproperty_check(&prop, ptr); - pprop= (PointerPropertyRNA*)prop; - if(pprop->type) - return pprop->type; + if(prop->type == PROP_POINTER) { + PointerPropertyRNA *pprop= (PointerPropertyRNA*)prop; + + if(pprop->type) + return pprop->type; + } + else if(prop->type == PROP_COLLECTION) { + CollectionPropertyRNA *cprop= (CollectionPropertyRNA*)prop; + + if(cprop->type) + return cprop->type; + } return &RNA_UnknownType; } |