the input fields for data name had an inconsistant limit for input fields, making it hard to fix problems with library linking when a name changed.
some were 18, most 19, and others 21. made all 21 since this is the real limit. Also new image name limit length of input field to 21 (was 255 but shortened to 21) The one place this could be useful is if somebody names a metaball with a 21 char name, the copy will not use the motherball. but this is not as bad as having to use the python console for fixing library linking problems.
This commit is contained in:
@@ -4424,7 +4424,7 @@ static void editing_panel_links(Object *ob)
|
||||
uiBlockSetCol(block, TH_AUTO);
|
||||
}
|
||||
if(ob) {
|
||||
but = uiDefBut(block, TEX, B_IDNAME, "OB:", xco, 180, 454-xco, YIC, ob->id.name+2, 0.0, 19.0, 0, 0, "Displays Active Object name. Click to change.");
|
||||
but = uiDefBut(block, TEX, B_IDNAME, "OB:", xco, 180, 454-xco, YIC, ob->id.name+2, 0.0, 21.0, 0, 0, "Active Object name.");
|
||||
#ifdef WITH_VERSE
|
||||
if(ob->vnode) uiButSetFunc(but, test_and_send_idbutton_cb, ob, ob->id.name);
|
||||
else uiButSetFunc(but, test_idbutton_cb, ob->id.name, NULL);
|
||||
@@ -4676,7 +4676,7 @@ void sculptmode_draw_interface_textures(uiBlock *block, unsigned short cx, unsig
|
||||
IDnames_to_pupstring(&strp, NULL, "ADD NEW %x 32767", &G.main->tex, id, &G.buts->texnr);
|
||||
|
||||
if(mtex && mtex->tex) {
|
||||
uiDefBut(block, TEX, B_IDNAME, "TE:",cx,cy,115,19, mtex->tex->id.name+2, 0.0, 18.0, 0, 0, "Texture name");
|
||||
uiDefBut(block, TEX, B_IDNAME, "TE:",cx,cy,115,19, mtex->tex->id.name+2, 0.0, 21.0, 0, 0, "Texture name");
|
||||
cy-= 20;
|
||||
|
||||
uiDefButS(block,MENU,B_SCULPT_TEXBROWSE, strp, cx,cy,20,19, &G.buts->texnr, 0,0,0,0, "Selects an existing texture or creates new");
|
||||
|
||||
@@ -1682,7 +1682,7 @@ static short draw_actuatorbuttons(bActuator *act, uiBlock *block, short xco, sho
|
||||
|
||||
if(sa->sound) {
|
||||
char dummy_str[] = "Sound mode %t|Play Stop %x0|Play End %x1|Loop Stop %x2|Loop End %x3|Loop Ping Pong Stop %x5|Loop Ping Pong %x4";
|
||||
uiDefBut(block, TEX, B_IDNAME, "SO:",xco+30,yco-22,width-40,19, sa->sound->id.name+2, 0.0, 18.0, 0, 0, "");
|
||||
uiDefBut(block, TEX, B_IDNAME, "SO:",xco+30,yco-22,width-40,19, sa->sound->id.name+2, 0.0, 21.0, 0, 0, "");
|
||||
uiDefButS(block, MENU, 1, dummy_str,xco+10,yco-44,width-20, 19, &sa->type, 0.0, 0.0, 0, 0, "");
|
||||
uiDefButF(block, NUM, 0, "Volume:", xco+10,yco-66,wval, 19, &sa->sound->volume, 0.0, 1.0, 0, 0, "Sets the volume of this sound");
|
||||
uiDefButF(block, NUM, 0, "Pitch:",xco+wval+10,yco-66,wval, 19, &sa->sound->pitch,-12.0, 12.0, 0, 0, "Sets the pitch of this sound");
|
||||
|
||||
@@ -1971,7 +1971,7 @@ static void object_panel_object(Object *ob)
|
||||
xco= 160;
|
||||
|
||||
uiBlockBeginAlign(block);
|
||||
but = uiDefBut(block, TEX, B_IDNAME, "GR:", 10, 120-yco, 150, 20, group->id.name+2, 0.0, 19.0, 0, 0, "Displays Group name. Click to change.");
|
||||
but = uiDefBut(block, TEX, B_IDNAME, "GR:", 10, 120-yco, 150, 20, group->id.name+2, 0.0, 21.0, 0, 0, "Displays Group name. Click to change.");
|
||||
uiButSetFunc(but, test_idbutton_cb, group->id.name, NULL);
|
||||
|
||||
if(group->id.lib) {
|
||||
|
||||
@@ -1101,7 +1101,7 @@ void uiblock_image_panel(uiBlock *block, Image **ima_pp, ImageUser *iuser,
|
||||
if(ima) {
|
||||
int drawpack= (ima->source!=IMA_SRC_SEQUENCE && ima->source!=IMA_SRC_MOVIE && ima->ok);
|
||||
|
||||
but= uiDefBut(block, TEX, B_IDNAME, "IM:", 33, 155, 177, 20, ima->id.name+2, 0.0, 19.0, 0, 0, "Current Image Datablock name.");
|
||||
but= uiDefBut(block, TEX, B_IDNAME, "IM:", 33, 155, 177, 20, ima->id.name+2, 0.0, 21.0, 0, 0, "Current Image Datablock name.");
|
||||
uiButSetFunc(but, test_idbutton_cb, ima->id.name, NULL);
|
||||
but= uiDefBut(block, BUT, imagechanged, "Reload", 210, 155, 60, 20, NULL, 0, 0, 0, 0, "Reloads Image or Movie");
|
||||
uiButSetFunc(but, image_reload_cb, ima, iuser);
|
||||
@@ -2014,7 +2014,7 @@ static void world_panel_texture(World *wrld)
|
||||
MEM_freeN(strp);
|
||||
|
||||
if(id) {
|
||||
uiDefBut(block, TEX, B_IDNAME, "TE:", 100,160,200,19, id->name+2, 0.0, 18.0, 0, 0, "Displays name of the texture block: click to change");
|
||||
uiDefBut(block, TEX, B_IDNAME, "TE:", 100,160,200,19, id->name+2, 0.0, 21.0, 0, 0, "Displays name of the texture block: click to change");
|
||||
sprintf(str, "%d", id->us);
|
||||
uiDefBut(block, BUT, 0, str, 196,140,21,19, 0, 0, 0, 0, 0, "Displays number of users of texture: click to make single user");
|
||||
uiDefIconBut(block, BUT, B_AUTOTEXNAME, ICON_AUTO, 220,140,21,19, 0, 0, 0, 0, 0, "Auto-assigns name to texture");
|
||||
@@ -2394,7 +2394,7 @@ static void lamp_panel_texture(Object *ob, Lamp *la)
|
||||
MEM_freeN(strp);
|
||||
|
||||
if(id) {
|
||||
uiDefBut(block, TEX, B_IDNAME, "TE:", 100,160,200,19, id->name+2, 0.0, 18.0, 0, 0, "Displays name of the texture block: click to change");
|
||||
uiDefBut(block, TEX, B_IDNAME, "TE:", 100,160,200,19, id->name+2, 0.0, 21.0, 0, 0, "Displays name of the texture block: click to change");
|
||||
sprintf(str, "%d", id->us);
|
||||
uiDefBut(block, BUT, 0, str, 196,140,21,19, 0, 0, 0, 0, 0, "Displays number of users of texture: click to make single user");
|
||||
uiDefIconBut(block, BUT, B_AUTOTEXNAME, ICON_AUTO, 221,140,21,19, 0, 0, 0, 0, 0, "Auto-assigns name to texture");
|
||||
@@ -3148,7 +3148,7 @@ static void material_panel_texture(Material *ma)
|
||||
MEM_freeN(strp);
|
||||
|
||||
if(id) {
|
||||
uiDefBut(block, TEX, B_IDNAME, "TE:", 100,150,163,20, id->name+2, 0.0, 18.0, 0, 0, "Displays name of the texture block: click to change");
|
||||
uiDefBut(block, TEX, B_IDNAME, "TE:", 100,150,163,20, id->name+2, 0.0, 21.0, 0, 0, "Displays name of the texture block: click to change");
|
||||
sprintf(str, "%d", id->us);
|
||||
uiDefBut(block, BUT, 0, str, 196,130,21,20, 0, 0, 0, 0, 0, "Displays number of users of texture");
|
||||
uiDefIconBut(block, BUT, B_AUTOTEXNAME, ICON_AUTO, 241,130,21,20, 0, 0, 0, 0, 0, "Auto-assigns name to texture");
|
||||
@@ -3589,7 +3589,7 @@ static void material_panel_links(Object *ob, Material *ma)
|
||||
|
||||
strncpy(str, id->name, 2);
|
||||
str[2]= ':'; str[3]= 0;
|
||||
but= uiDefBut(block, TEX, B_IDNAME, str, 10,135,115,20, id->name+2, 0.0, 18.0, 0, 0, "Shows the block the material is linked to");
|
||||
but= uiDefBut(block, TEX, B_IDNAME, str, 10,135,115,20, id->name+2, 0.0, 21.0, 0, 0, "Shows the block the material is linked to");
|
||||
uiButSetFunc(but, test_idbutton_cb, id->name, NULL);
|
||||
}
|
||||
|
||||
|
||||
@@ -2206,7 +2206,7 @@ static void view3d_panel_object(short cntrl) // VIEW3D_HANDLER_OBJECT
|
||||
uiBlockSetFlag(block, UI_BLOCK_FRONTBUFFER); // force old style frontbuffer draw
|
||||
}
|
||||
else {
|
||||
bt= uiDefBut(block, TEX, B_IDNAME, "OB: ", 10,180,140,20, ob->id.name+2, 0.0, 19.0, 0, 0, "");
|
||||
bt= uiDefBut(block, TEX, B_IDNAME, "OB: ", 10,180,140,20, ob->id.name+2, 0.0, 21.0, 0, 0, "");
|
||||
#ifdef WITH_VERSE
|
||||
if(ob->vnode) uiButSetFunc(bt, test_and_send_idbutton_cb, ob, ob->id.name);
|
||||
else uiButSetFunc(bt, test_idbutton_cb, ob->id.name, NULL);
|
||||
|
||||
@@ -1880,11 +1880,11 @@ void new_image_sima(void)
|
||||
{
|
||||
static int width= 256, height= 256;
|
||||
static short uvtestgrid=0;
|
||||
char name[256];
|
||||
char name[22];
|
||||
|
||||
strcpy(name, "Untitled");
|
||||
|
||||
add_numbut(0, TEX, "Name:", 0, 255, name, NULL);
|
||||
add_numbut(0, TEX, "Name:", 0, 21, name, NULL);
|
||||
add_numbut(1, NUM|INT, "Width:", 1, 5000, &width, NULL);
|
||||
add_numbut(2, NUM|INT, "Height:", 1, 5000, &height, NULL);
|
||||
add_numbut(3, TOG|SHO, "UV Test Grid", 0, 0, &uvtestgrid, NULL);
|
||||
|
||||
@@ -328,7 +328,7 @@ int std_libbuttons(uiBlock *block, short xco, short yco,
|
||||
else if(yco) len= 140; // comes from button panel
|
||||
else len= 120;
|
||||
|
||||
but= uiDefBut(block, TEX, B_IDNAME, str1,xco, yco, (short)len, YIC, id->name+2, 0.0, 19.0, 0, 0, "Displays current Datablock name. Click to change.");
|
||||
but= uiDefBut(block, TEX, B_IDNAME, str1,xco, yco, (short)len, YIC, id->name+2, 0.0, 21.0, 0, 0, "Displays current Datablock name. Click to change.");
|
||||
uiButSetFunc(but, test_idbutton_cb, id->name, NULL);
|
||||
|
||||
uiClearButLock();
|
||||
|
||||
Reference in New Issue
Block a user