diff options
author | Jason Hays <jason_hays22@mymail.eku.edu> | 2011-09-18 05:09:18 +0400 |
---|---|---|
committer | Jason Hays <jason_hays22@mymail.eku.edu> | 2011-09-18 05:09:18 +0400 |
commit | 1b5d16f1bf80f2da8d3d4da5bbfaf4819c14a225 (patch) | |
tree | bd0b61b204bfc020c9ab781a3e6183a4c45fca6c /source/blender/editors/sculpt_paint/paint_utils.c | |
parent | 101937e2ddf4d0453868373b644873586febf6e2 (diff) |
I made multitude of fixes based on the comments provided online:
Removed the drawSelectedVerts and added drawSelectedVertices, which uses dm->foreachMappedVert.
In calc_weightpaint_vert_color():
Made the weight paint color black and return instead of input=-1
Made the pose bone selection normal when multi-paint is inactive.
Name fix for functions using mv instead of mvert.
Used vector functions provided by the math lib.
Changed some MEM_callocN references to be stacks.
Changed dm_deform_clear to use ob->derivedDeform primarily
Made the variable "float **changes" into "float (*changes)[2]"
Used CTX_data_active_object() in place of CTX_data_pointer_get_type()
Added the invert selection hotkey "Ctrl+I" to weight paint's vertex mask.
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_utils.c')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_utils.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_utils.c b/source/blender/editors/sculpt_paint/paint_utils.c index 18f59536092..8d7a3323f57 100644 --- a/source/blender/editors/sculpt_paint/paint_utils.c +++ b/source/blender/editors/sculpt_paint/paint_utils.c @@ -381,7 +381,26 @@ void PAINT_OT_vert_select_all(wmOperatorType *ot) WM_operator_properties_select_all(ot); } +/* Jason */ +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; +} +/* Jason */ +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); |