Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGaia Clary <gaia.clary@machinimatrix.org>2013-06-26 02:19:48 +0400
committerGaia Clary <gaia.clary@machinimatrix.org>2013-06-26 02:19:48 +0400
commit06b82088fab1febff4c0b74d6593b05ab486997f (patch)
tree0c5f2296ed92b7dd5c1c8e1f6f474d3b39325880 /source/blender/editors/space_view3d/view3d_buttons.c
parenteacd013cb40d23964a1cab08279c9feffa54997b (diff)
disable normalize when active vertex contains locked weights
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_buttons.c')
-rw-r--r--source/blender/editors/space_view3d/view3d_buttons.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/editors/space_view3d/view3d_buttons.c b/source/blender/editors/space_view3d/view3d_buttons.c
index d234b176dcf..d2fb5886171 100644
--- a/source/blender/editors/space_view3d/view3d_buttons.c
+++ b/source/blender/editors/space_view3d/view3d_buttons.c
@@ -839,6 +839,7 @@ static void view3d_panel_vgroup(const bContext *C, Panel *pa)
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 @@ static void view3d_panel_vgroup(const bContext *C, Panel *pa)
uiButSetFlag(but, UI_TEXT_LEFT);
if (dg->flag & DG_LOCK_WEIGHT) {
uiButSetFlag(but, UI_BUT_DISABLED);
+ locked++;
}
xco += x;
@@ -911,7 +913,10 @@ static void view3d_panel_vgroup(const bContext *C, Panel *pa)
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",