[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [57506] trunk/blender/source/blender/ editors/space_view3d/view3d_buttons.c: Improved layout of Vertex Weights panel, added option to change active vgroup
Gaia Clary
gaia.clary at machinimatrix.org
Sun Jun 16 17:44:18 CEST 2013
Revision: 57506
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=57506
Author: gaiaclary
Date: 2013-06-16 15:44:17 +0000 (Sun, 16 Jun 2013)
Log Message:
-----------
Improved layout of Vertex Weights panel, added option to change active vgroup
Modified Paths:
--------------
trunk/blender/source/blender/editors/space_view3d/view3d_buttons.c
Modified: trunk/blender/source/blender/editors/space_view3d/view3d_buttons.c
===================================================================
--- trunk/blender/source/blender/editors/space_view3d/view3d_buttons.c 2013-06-16 15:08:25 UTC (rev 57505)
+++ trunk/blender/source/blender/editors/space_view3d/view3d_buttons.c 2013-06-16 15:44:17 UTC (rev 57506)
@@ -1134,6 +1134,8 @@
if (dv && dv->totweight) {
uiLayout *col;
uiLayout *row;
+ uiLayout *box;
+ uiBut *but;
bDeformGroup *dg;
unsigned int i;
int subset_count, vgroup_tot;
@@ -1142,8 +1144,9 @@
int yco = 0;
uiBlockSetHandleFunc(block, do_view3d_vgroup_buttons, NULL);
+ box = uiLayoutBox(pa->layout);
- col = uiLayoutColumn(pa->layout, true);
+ col = uiLayoutColumn(box, true);
vgroup_validmap = ED_vgroup_subset_from_select_type(ob, subset_type, &vgroup_tot, &subset_count);
for (i = 0, dg = ob->defbase.first; dg; i++, dg = dg->next) {
@@ -1153,9 +1156,24 @@
int x, xco = 0;
row = uiLayoutRow(col, true);
(void)row;
- uiDefButF(block, NUM, B_VGRP_PNL_EDIT_SINGLE + i, dg->name,
- xco, yco, (x = UI_UNIT_X * 9), UI_UNIT_Y,
+
+ uiBlockSetEmboss(block, UI_EMBOSSN);
+ but = uiDefBut(block, BUT, B_VGRP_PNL_ACTIVE + i, dg->name,
+ xco, yco, (x = UI_UNIT_X * 5), UI_UNIT_Y,
+ NULL, 0.0, 1.0, 1, 3, "");
+ uiButSetFlag(but, UI_TEXT_LEFT);
+
+ if (ob->actdef != i + 1) {
+ uiButSetFlag(but, UI_BUT_INACTIVE);
+ }
+ xco += x;
+
+ //uiBlockSetEmboss(block, UI_EMBOSS);
+
+ but = uiDefButF(block, NUM, B_VGRP_PNL_EDIT_SINGLE + i, "",
+ xco, yco, (x = UI_UNIT_X * 4), UI_UNIT_Y,
&dw->weight, 0.0, 1.0, 1, 3, "");
+ uiButSetFlag(but, UI_TEXT_LEFT);
xco += x;
uiDefIconBut(block, BUT, B_VGRP_PNL_COPY_SINGLE + i, ICON_PASTEDOWN,
@@ -1177,6 +1195,7 @@
yco -= 2;
+ uiBlockSetEmboss(block, UI_EMBOSS);
col = uiLayoutColumn(pa->layout, true);
row = uiLayoutRow(col, true);
More information about the Bf-blender-cvs
mailing list