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-06-24 18:03:55 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2009-06-24 18:03:55 +0400
commit242d9c31d3316f99525925eb7da30522457064e8 (patch)
tree2ff511c7ebf191a2a6376c53a63050afe459492f /source/blender/editors/space_buttons
parent9abce5dfbaee953fcec0779a94cbadc3516b9daf (diff)
RNA
* RNA_struct_name_get_alloc function to get the name from a pointer, instead of having to deal with name property. * CTX_data_pointer_get_type to get data from context with a check for the RNA type.
Diffstat (limited to 'source/blender/editors/space_buttons')
-rw-r--r--source/blender/editors/space_buttons/buttons_context.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/source/blender/editors/space_buttons/buttons_context.c b/source/blender/editors/space_buttons/buttons_context.c
index d97b4acdb96..cba9a4cf8fc 100644
--- a/source/blender/editors/space_buttons/buttons_context.c
+++ b/source/blender/editors/space_buttons/buttons_context.c
@@ -668,7 +668,6 @@ void buttons_context_draw(const bContext *C, uiLayout *layout)
uiBlock *block;
uiBut *but;
PointerRNA *ptr;
- PropertyRNA *nameprop;
char namebuf[128], *name;
int a, icon;
@@ -688,7 +687,7 @@ void buttons_context_draw(const bContext *C, uiLayout *layout)
if(ptr->data) {
icon= RNA_struct_ui_icon(ptr->type);
- nameprop= RNA_struct_name_property(ptr->type);
+ name= RNA_struct_name_get_alloc(ptr, namebuf, sizeof(namebuf));
#if 0
if(sbuts->mainb != BCONTEXT_SCENE && ptr->type == &RNA_Scene) {
@@ -696,9 +695,7 @@ void buttons_context_draw(const bContext *C, uiLayout *layout)
}
else
#endif
- if(nameprop) {
- name= RNA_property_string_get_alloc(ptr, nameprop, namebuf, sizeof(namebuf));
-
+ if(name) {
uiItemL(row, name, icon);
if(name != namebuf)