- 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.
This commit is contained in:
2010-07-31 01:06:08 +00:00
parent a53a928773
commit 1280b6f902
6 changed files with 29 additions and 17 deletions

View File

@@ -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);

View File

@@ -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)

View File

@@ -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);
}

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;
}
}