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
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')
-rw-r--r--source/blender/makesrna/intern/rna_access.c17
-rw-r--r--source/blender/makesrna/intern/rna_scene.c1
2 files changed, 13 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;
}
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index 6e4fd39d039..1b23aad6214 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -430,6 +430,7 @@ void RNA_def_scene(BlenderRNA *brna)
RNA_def_struct_ui_text(srna, "Scene", "Scene consisting objects and defining time and render related settings.");
prop= RNA_def_property(srna, "camera", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Active Camera", "Active camera used for rendering the scene.");
prop= RNA_def_property(srna, "cursor_location", PROP_FLOAT, PROP_VECTOR);