[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [57746] trunk/blender/source/blender/ editors/space_view3d/view3d_buttons.c: disable normalize when active vertex contains locked weights
Gaia Clary
gaia.clary at machinimatrix.org
Wed Jun 26 00:19:49 CEST 2013
Revision: 57746
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=57746
Author: gaiaclary
Date: 2013-06-25 22:19:48 +0000 (Tue, 25 Jun 2013)
Log Message:
-----------
disable normalize when active vertex contains locked weights
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-25 21:06:35 UTC (rev 57745)
+++ trunk/blender/source/blender/editors/space_view3d/view3d_buttons.c 2013-06-25 22:19:48 UTC (rev 57746)
@@ -839,6 +839,7 @@
const bool *vgroup_validmap;
eVGroupSelect subset_type = ts->vgroupsubset;
int yco = 0;
+ int locked = 0;
uiBlockSetHandleFunc(block, do_view3d_vgroup_buttons, NULL);
@@ -879,6 +880,7 @@
uiButSetFlag(but, UI_TEXT_LEFT);
if (dg->flag & DG_LOCK_WEIGHT) {
uiButSetFlag(but, UI_BUT_DISABLED);
+ locked++;
}
xco += x;
@@ -911,7 +913,10 @@
ot = WM_operatortype_find("OBJECT_OT_vertex_weight_normalize_active", 1);
but = uiDefButO_ptr(block, BUT, ot, WM_OP_EXEC_DEFAULT, "Normalize",
0, yco, UI_UNIT_X * 5, UI_UNIT_Y,
- TIP_("Normalize active vertex weights"));
+ TIP_("Normalize weights of active vertex (if affected groups are unlocked"));
+ if(locked) {
+ uiButSetFlag(but, UI_BUT_DISABLED);
+ }
ot = WM_operatortype_find("OBJECT_OT_vertex_weight_copy", 1);
but = uiDefButO_ptr(block, BUT, ot, WM_OP_EXEC_DEFAULT, "Copy",
More information about the Bf-blender-cvs
mailing list