From cf76410cab5f76173cd3b2906d73c0adb54e5261 Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Tue, 5 Sep 2006 08:38:30 +0000 Subject: [PATCH] Alignment of button "Auto tex space" broke with commit for vertex groups. --- source/blender/src/buttons_editing.c | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/source/blender/src/buttons_editing.c b/source/blender/src/buttons_editing.c index 335a11a9bb6..3ef5df2677d 100644 --- a/source/blender/src/buttons_editing.c +++ b/source/blender/src/buttons_editing.c @@ -3845,23 +3845,24 @@ static void editing_panel_links(Object *ob) defCount=BLI_countlist(&ob->defbase); - uiBlockBeginAlign(block); if (defCount) { char *menustr= get_vertexgroup_menustr(ob); + uiBlockBeginAlign(block); + uiDefButS(block, MENU, B_MAKEDISP, menustr, 143, 132,18,21, &ob->actdef, 1, defCount, 0, 0, "Browses available vertex groups"); MEM_freeN (menustr); - } - if (ob->actdef){ - defGroup = BLI_findlink(&ob->defbase, ob->actdef-1); - but= uiDefBut(block, TEX, REDRAWBUTSEDIT,"", 161,132,140-18,21, defGroup->name, 0, 31, 0, 0, "Displays current vertex group name. Click to change. (Match bone name for deformation.)"); - uiButSetFunc(but, verify_vertexgroup_name_func, defGroup, NULL); - uiButSetCompleteFunc(but, autocomplete_vgroup, (void *)ob); - - uiDefButF(block, NUM, REDRAWVIEW3D, "Weight:", 143, 111, 140, 21, &editbutvweight, 0, 1, 10, 0, "Sets the current vertex group's bone deformation strength"); + if (ob->actdef){ + defGroup = BLI_findlink(&ob->defbase, ob->actdef-1); + but= uiDefBut(block, TEX, REDRAWBUTSEDIT,"", 161,132,140-18,21, defGroup->name, 0, 31, 0, 0, "Displays current vertex group name. Click to change. (Match bone name for deformation.)"); + uiButSetFunc(but, verify_vertexgroup_name_func, defGroup, NULL); + uiButSetCompleteFunc(but, autocomplete_vgroup, (void *)ob); + + uiDefButF(block, NUM, REDRAWVIEW3D, "Weight:", 143, 111, 140, 21, &editbutvweight, 0, 1, 10, 0, "Sets the current vertex group's bone deformation strength"); + } + uiBlockEndAlign(block); } - uiBlockEndAlign(block); if (G.obedit && G.obedit==ob){ uiBlockBeginAlign(block); @@ -3880,14 +3881,12 @@ static void editing_panel_links(Object *ob) if(id->us>1) uiDefBut(block, BUT,B_LINKEDVGROUP, "Copy To Linked", 143,69,140,20, 0, 0, 0, 0, 0, "Creates identical vertex group names in other Objects using this Object-data"); } - } - + } /* now only objects that can be visible rendered */ if ELEM5(ob->type, OB_MESH, OB_CURVE, OB_SURF, OB_FONT, OB_MBALL); else return; - if(ob->type==OB_MESH) poin= &( ((Mesh *)ob->data)->texflag ); else if(ob->type==OB_MBALL) poin= &( ((MetaBall *)ob->data)->texflag ); else poin= &( ((Curve *)ob->data)->texflag );