diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-09-22 20:09:27 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-09-22 20:09:27 +0400 |
commit | 7126a4699e3b85f47cd2cc84bdb6a511e9a17f69 (patch) | |
tree | 74af0d993321a75c5a3fb61e6fbeca2011784b24 /source/blender/editors/sculpt_paint/paint_utils.c | |
parent | 52a131b6006e131b02225040d0c9e48f5fd8efac (diff) | |
parent | 535668eef01b29b18b71022d1d8f04962251e34c (diff) |
svn merge ^/trunk/blender -r40367:40368 --- raddish weight paint merge
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_utils.c')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_utils.c | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_utils.c b/source/blender/editors/sculpt_paint/paint_utils.c index f385db8dc97..bed482e6a58 100644 --- a/source/blender/editors/sculpt_paint/paint_utils.c +++ b/source/blender/editors/sculpt_paint/paint_utils.c @@ -387,6 +387,49 @@ void PAINT_OT_face_select_all(wmOperatorType *ot) WM_operator_properties_select_all(ot); } + +static int vert_select_all_exec(bContext *C, wmOperator *op) +{ + Object *ob= CTX_data_active_object(C); + paintvert_deselect_all_visible(ob, RNA_enum_get(op->ptr, "action"), TRUE); + ED_region_tag_redraw(CTX_wm_region(C)); + return OPERATOR_FINISHED; +} + + +void PAINT_OT_vert_select_all(wmOperatorType *ot) +{ + ot->name= "Vertex Selection"; + ot->description= "Change selection for all vertices"; + ot->idname= "PAINT_OT_vert_select_all"; + + ot->exec= vert_select_all_exec; + ot->poll= vert_paint_poll; + + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + + WM_operator_properties_select_all(ot); +} + +static int vert_select_inverse_exec(bContext *C, wmOperator *UNUSED(op)) +{ + Object *ob= CTX_data_active_object(C); + paintvert_deselect_all_visible(ob, SEL_INVERT, TRUE); + ED_region_tag_redraw(CTX_wm_region(C)); + return OPERATOR_FINISHED; +} + +void PAINT_OT_vert_select_inverse(wmOperatorType *ot) +{ + ot->name= "Vertex Select Invert"; + ot->description= "Invert selection of vertices"; + ot->idname= "PAINT_OT_vert_select_inverse"; + + ot->exec= vert_select_inverse_exec; + ot->poll= vert_paint_poll; + + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; +} static int face_select_inverse_exec(bContext *C, wmOperator *UNUSED(op)) { Object *ob= CTX_data_active_object(C); |