diff options
author | Jason Hays <jason_hays22@mymail.eku.edu> | 2011-07-20 19:56:35 +0400 |
---|---|---|
committer | Jason Hays <jason_hays22@mymail.eku.edu> | 2011-07-20 19:56:35 +0400 |
commit | fb3783bd13c5258e48d3c94abce82e3b9156adac (patch) | |
tree | 2447de1064117ac7538317f5cad142e8277e5875 /source/blender/editors/space_view3d/view3d_header.c | |
parent | c6444eaa0f1a3ef7bf50c1e2d0d0b54406f75732 (diff) |
Added vertex masking support for the weight paint vgroup functions including:
Normalize, Normalize All, Invert, Clean, and Levels.
Face mask and vertex select/mask are now mutually exclusive options.
Went ahead and allowed vertex selection support and masking for vertex paint.
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_header.c')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_header.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/source/blender/editors/space_view3d/view3d_header.c b/source/blender/editors/space_view3d/view3d_header.c index a1a73b27b8d..680bd6b62e4 100644 --- a/source/blender/editors/space_view3d/view3d_header.c +++ b/source/blender/editors/space_view3d/view3d_header.c @@ -496,12 +496,14 @@ void uiTemplateHeader3D(uiLayout *layout, struct bContext *C) PointerRNA meshptr; RNA_pointer_create(&ob->id, &RNA_Mesh, ob->data, &meshptr); - //uiItemR(layout, &meshptr, "use_paint_mask", UI_ITEM_R_ICON_ONLY, "", ICON_NONE); - // Jason - row= uiLayoutRow(layout, 1); - // TODO: make it so at most one can be active. - uiItemR(row, &meshptr, "use_paint_mask", UI_ITEM_R_ICON_ONLY, "", ICON_NONE); - uiItemR(row, &meshptr, "wp_vert_sel", UI_ITEM_R_ICON_ONLY, "", ICON_NONE); + if(ob->mode & OB_MODE_TEXTURE_PAINT) { + uiItemR(layout, &meshptr, "use_paint_mask", UI_ITEM_R_ICON_ONLY, "", ICON_NONE); + } else { + // Jason + row= uiLayoutRow(layout, 1); + uiItemR(row, &meshptr, "use_paint_mask", UI_ITEM_R_ICON_ONLY, "", ICON_NONE); + uiItemR(row, &meshptr, "wp_vert_sel", UI_ITEM_R_ICON_ONLY, "", ICON_NONE); + } } else { const char *str_menu; |