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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2009-03-30 21:31:37 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2009-03-30 21:31:37 +0400
commitfe33fb23d9c4ba4951e8db080363777fd0db8949 (patch)
treeaf4b73242d3ef069375dd6b7dde750d6a86bbdd1 /source/blender/makesrna/intern/rna_access.c
parent5e4242dab0d06a5831d02cb750883b196a6d32f8 (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.c17
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;
}