diff options
author | Joshua Leung <aligorith@gmail.com> | 2009-06-25 08:33:21 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2009-06-25 08:33:21 +0400 |
commit | a1c5c501a6b4b8bfdee6f60869c122fb6f321726 (patch) | |
tree | b2bd0a250560638b3f08627494eeb002e067a8c9 /source/blender/editors/space_outliner | |
parent | e5f6a41b1b7125a4c3bc7ef2554c04b768ac765c (diff) | |
parent | 7a357cba3994bee7d05c7a8bf5736eb94067d564 (diff) |
At last... this merge should finally do the trick!
21073 to 21145
Diffstat (limited to 'source/blender/editors/space_outliner')
-rw-r--r-- | source/blender/editors/space_outliner/Makefile | 2 | ||||
-rw-r--r-- | source/blender/editors/space_outliner/outliner.c | 19 |
2 files changed, 9 insertions, 12 deletions
diff --git a/source/blender/editors/space_outliner/Makefile b/source/blender/editors/space_outliner/Makefile index 19d40a4a31e..8d7cd017e0b 100644 --- a/source/blender/editors/space_outliner/Makefile +++ b/source/blender/editors/space_outliner/Makefile @@ -1,5 +1,5 @@ # -# $Id: Makefile 14 2002-10-13 15:57:19Z hans $ +# $Id$ # # ***** BEGIN GPL LICENSE BLOCK ***** # diff --git a/source/blender/editors/space_outliner/outliner.c b/source/blender/editors/space_outliner/outliner.c index eba0aa84e85..6563a7dc7df 100644 --- a/source/blender/editors/space_outliner/outliner.c +++ b/source/blender/editors/space_outliner/outliner.c @@ -1031,7 +1031,7 @@ static TreeElement *outliner_add_element(SpaceOops *soops, ListBase *lb, void *i } else if(ELEM3(type, TSE_RNA_STRUCT, TSE_RNA_PROPERTY, TSE_RNA_ARRAY_ELEM)) { PointerRNA pptr, propptr, *ptr= (PointerRNA*)idv; - PropertyRNA *prop, *iterprop, *nameprop; + PropertyRNA *prop, *iterprop; PropertyType proptype; PropertySubType propsubtype; int a, tot; @@ -1043,12 +1043,10 @@ static TreeElement *outliner_add_element(SpaceOops *soops, ListBase *lb, void *i } else if(type == TSE_RNA_STRUCT) { /* struct */ - nameprop= RNA_struct_name_property(ptr->type); + te->name= RNA_struct_name_get_alloc(ptr, NULL, 0); - if(nameprop) { - te->name= RNA_property_string_get_alloc(ptr, nameprop, NULL, 0); + if(te->name) te->flag |= TE_FREE_NAME; - } else te->name= (char*)RNA_struct_ui_name(ptr->type); @@ -3075,7 +3073,7 @@ static void tree_element_to_path(SpaceOops *soops, TreeElement *te, TreeStoreEle TreeElement *tem, *temnext, *temsub; TreeStoreElem *tse, *tsenext; PointerRNA *ptr, *nextptr; - PropertyRNA *prop, *nameprop; + PropertyRNA *prop; char *newpath=NULL; /* optimise tricks: @@ -3119,17 +3117,16 @@ static void tree_element_to_path(SpaceOops *soops, TreeElement *te, TreeStoreEle newpath= RNA_path_append(*path, ptr, prop, 0, NULL); } else if(RNA_property_type(prop) == PROP_COLLECTION) { + char buf[128], *name; + temnext= (TreeElement*)(ld->next->data); tsenext= TREESTORE(temnext); nextptr= &temnext->rnaptr; - nameprop= RNA_struct_name_property(nextptr->type); + name= RNA_struct_name_get_alloc(nextptr, buf, sizeof(buf)); - if(nameprop) { + if(name) { /* if possible, use name as a key in the path */ - char buf[128], *name; - name= RNA_property_string_get_alloc(nextptr, nameprop, buf, sizeof(buf)); - newpath= RNA_path_append(*path, NULL, prop, 0, name); if(name != buf) |