diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-07-31 05:06:08 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-07-31 05:06:08 +0400 |
commit | 1280b6f9024de7c7a3d67cd2dfb80820164bc802 (patch) | |
tree | 13191f293953c5466c0b358ab519c047c73dcf89 | |
parent | a53a928773cfe15375febacaf49832aab47d9de1 (diff) |
- add back prefix for ID lists (LF) for linked and fake user for search fields.
- remove debug print for left/right name flipping & commented test from the sequencer.
-rw-r--r-- | source/blender/blenkernel/BKE_library.h | 1 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/deform.c | 1 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/library.c | 9 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/sequencer.c | 6 | ||||
-rw-r--r-- | source/blender/editors/interface/interface_layout.c | 24 | ||||
-rw-r--r-- | source/blender/editors/interface/interface_templates.c | 5 |
6 files changed, 29 insertions, 17 deletions
diff --git a/source/blender/blenkernel/BKE_library.h b/source/blender/blenkernel/BKE_library.h index fcf7ae85738..debccaa02f9 100644 --- a/source/blender/blenkernel/BKE_library.h +++ b/source/blender/blenkernel/BKE_library.h @@ -65,6 +65,7 @@ void tag_main(struct Main *mainvar, int tag); int splitIDname(char *name, char *left, int *nr); void rename_id(struct ID *id, char *name); +void name_uiprefix_id(char *name, struct ID *id); void test_idbutton(char *name); void text_idbutton(struct ID *id, char *text); void all_local(struct Library *lib, int untagged_only); diff --git a/source/blender/blenkernel/intern/deform.c b/source/blender/blenkernel/intern/deform.c index 5f262c526c3..ccb6ebe1f1e 100644 --- a/source/blender/blenkernel/intern/deform.c +++ b/source/blender/blenkernel/intern/deform.c @@ -471,7 +471,6 @@ void flip_side_name (char *name, const char *from_name, int strip_number) #undef IS_SEPARATOR sprintf (name, "%s%s%s%s", prefix, replace, suffix, number); - printf("'%s' --> '%s'\n", from_name, name); } float defvert_find_weight(const struct MDeformVert *dvert, int group_num) diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c index 716a0b7d41b..6852a487afa 100644 --- a/source/blender/blenkernel/intern/library.c +++ b/source/blender/blenkernel/intern/library.c @@ -1394,3 +1394,12 @@ void rename_id(ID *id, char *name) new_id(lb, id, name); } + +void name_uiprefix_id(char *name, ID *id) +{ + name[0] = id->lib ? 'L':' '; + name[1] = id->flag & LIB_FAKEUSER ? 'F':' '; + name[2] = ' '; + + strcpy(name+3, id->name+2); +} diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c index 4f3ad50e294..df185732d22 100644 --- a/source/blender/blenkernel/intern/sequencer.c +++ b/source/blender/blenkernel/intern/sequencer.c @@ -1876,12 +1876,6 @@ static ImBuf * seq_render_scene_strip_impl( addzbuffloatImBuf(ibuf); memcpy(ibuf->zbuf_float, rres.rectz, sizeof(float)*rres.rectx*rres.recty); } - - /* { - ImBuf *imb= IMB_allocImBuf(rres.rectx, rres.recty, 32, IB_rectfloat, 0); - IMB_saveiff(imb, "/tmp/foo.image", IB_rect | IB_metadata); - IMB_freeImBuf(imb); - } */ /* float buffers in the sequencer are not linear */ ibuf->profile= IB_PROFILE_LINEAR_RGB; diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c index c2bcc673c1e..b6f4dcc0356 100644 --- a/source/blender/editors/interface/interface_layout.c +++ b/source/blender/editors/interface/interface_layout.c @@ -1111,13 +1111,19 @@ static void rna_search_cb(const struct bContext *C, void *arg_but, char *str, ui if(itemptr.data == but->rnapoin.id.data) continue; - if(itemptr.type && RNA_struct_is_ID(itemptr.type)) - iconid= ui_id_icon_get((bContext*)C, itemptr.data, 1); - else + if(itemptr.type && RNA_struct_is_ID(itemptr.type)) { + ID *id= itemptr.data; + char name_ui[32]; + + name_uiprefix_id(name_ui, id); + name= BLI_strdup(name_ui); + iconid= ui_id_icon_get((bContext*)C, id, 1); + } + else { + name= RNA_struct_name_get_alloc(&itemptr, NULL, 0); iconid = 0; - - name= RNA_struct_name_get_alloc(&itemptr, NULL, 0); - + } + if(name) { if(BLI_strcasestr(name, str)) { cis = MEM_callocN(sizeof(CollItemSearch), "CollectionItemSearch"); @@ -1126,9 +1132,9 @@ static void rna_search_cb(const struct bContext *C, void *arg_but, char *str, ui cis->iconid = iconid; BLI_addtail(items_list, cis); } - MEM_freeN(name); - } - + MEM_freeN(name); + } + i++; } RNA_PROP_END; diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index 488258d2a06..1b600a26001 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -218,9 +218,12 @@ static void id_search_cb(const bContext *C, void *arg_template, char *str, uiSea continue; if(BLI_strcasestr(id->name+2, str)) { + char name_ui[32]; + name_uiprefix_id(name_ui, id); + iconid= ui_id_icon_get((bContext*)C, id, 1); - if(!uiSearchItemAdd(items, id->name+2, id, iconid)) + if(!uiSearchItemAdd(items, name_ui, id, iconid)) break; } } |