diff options
Diffstat (limited to 'source/blender/editors/mesh')
-rw-r--r-- | source/blender/editors/mesh/editface.c | 2 | ||||
-rw-r--r-- | source/blender/editors/mesh/editmesh_knife.c | 8 | ||||
-rw-r--r-- | source/blender/editors/mesh/editmesh_loopcut.c | 7 | ||||
-rw-r--r-- | source/blender/editors/mesh/editmesh_rip.c | 6 | ||||
-rw-r--r-- | source/blender/editors/mesh/editmesh_select.c | 10 | ||||
-rw-r--r-- | source/blender/editors/mesh/editmesh_tools.c | 18 | ||||
-rw-r--r-- | source/blender/editors/mesh/mesh_data.c | 2 |
7 files changed, 26 insertions, 27 deletions
diff --git a/source/blender/editors/mesh/editface.c b/source/blender/editors/mesh/editface.c index 8d2e428b02c..9b26959ea28 100644 --- a/source/blender/editors/mesh/editface.c +++ b/source/blender/editors/mesh/editface.c @@ -294,7 +294,7 @@ static void select_linked_tfaces_with_seams(int mode, Mesh *me, unsigned int ind MEM_freeN(linkflag); } -void paintface_select_linked(bContext *UNUSED(C), Object *ob, int UNUSED(mval[2]), int mode) +void paintface_select_linked(bContext *UNUSED(C), Object *ob, const int UNUSED(mval[2]), int mode) { Mesh *me; unsigned int index = 0; diff --git a/source/blender/editors/mesh/editmesh_knife.c b/source/blender/editors/mesh/editmesh_knife.c index 96d90a8c0a5..af793c1e0a2 100644 --- a/source/blender/editors/mesh/editmesh_knife.c +++ b/source/blender/editors/mesh/editmesh_knife.c @@ -2944,7 +2944,7 @@ static void cage_mapped_verts_callback(void *userData, int index, const float co } } -static void knifetool_update_mval(KnifeTool_OpData *kcd, int mval_i[2]) +static void knifetool_update_mval(KnifeTool_OpData *kcd, const int mval_i[2]) { knife_recalc_projmat(kcd); kcd->vc.mval[0] = mval_i[0]; @@ -3034,7 +3034,7 @@ static int knifetool_cancel(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } -static int knifetool_invoke(bContext *C, wmOperator *op, wmEvent *evt) +static int knifetool_invoke(bContext *C, wmOperator *op, const wmEvent *event) { KnifeTool_OpData *kcd; @@ -3048,7 +3048,7 @@ static int knifetool_invoke(bContext *C, wmOperator *op, wmEvent *evt) WM_event_add_modal_handler(C, op); kcd = op->customdata; - knifetool_update_mval(kcd, evt->mval); + knifetool_update_mval(kcd, event->mval); knife_update_header(C, kcd); @@ -3119,7 +3119,7 @@ wmKeyMap *knifetool_modal_keymap(wmKeyConfig *keyconf) return keymap; } -static int knifetool_modal(bContext *C, wmOperator *op, wmEvent *event) +static int knifetool_modal(bContext *C, wmOperator *op, const wmEvent *event) { Object *obedit = CTX_data_edit_object(C); KnifeTool_OpData *kcd = op->customdata; diff --git a/source/blender/editors/mesh/editmesh_loopcut.c b/source/blender/editors/mesh/editmesh_loopcut.c index 83542915ec2..5b9864ca239 100644 --- a/source/blender/editors/mesh/editmesh_loopcut.c +++ b/source/blender/editors/mesh/editmesh_loopcut.c @@ -385,7 +385,7 @@ static int ringcut_cancel(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } -static int ringcut_invoke(bContext *C, wmOperator *op, wmEvent *evt) +static int ringcut_invoke(bContext *C, wmOperator *op, const wmEvent *event) { ScrArea *sa = CTX_wm_area(C); Object *obedit = CTX_data_edit_object(C); @@ -405,8 +405,7 @@ static int ringcut_invoke(bContext *C, wmOperator *op, wmEvent *evt) WM_event_add_modal_handler(C, op); lcd = op->customdata; - lcd->vc.mval[0] = evt->mval[0]; - lcd->vc.mval[1] = evt->mval[1]; + copy_v2_v2_int(lcd->vc.mval, event->mval); edge = EDBM_edge_find_nearest(&lcd->vc, &dist); if (edge != lcd->eed) { @@ -419,7 +418,7 @@ static int ringcut_invoke(bContext *C, wmOperator *op, wmEvent *evt) return OPERATOR_RUNNING_MODAL; } -static int loopcut_modal(bContext *C, wmOperator *op, wmEvent *event) +static int loopcut_modal(bContext *C, wmOperator *op, const wmEvent *event) { float smoothness = RNA_float_get(op->ptr, "smoothness"); int cuts = RNA_int_get(op->ptr, "number_cuts"); diff --git a/source/blender/editors/mesh/editmesh_rip.c b/source/blender/editors/mesh/editmesh_rip.c index 0ceec68f446..533ae26cfac 100644 --- a/source/blender/editors/mesh/editmesh_rip.c +++ b/source/blender/editors/mesh/editmesh_rip.c @@ -538,7 +538,7 @@ static int edbm_rip_call_edgesplit(BMEditMesh *em, wmOperator *op) /** * This is the main vert ripping function (rip when one vertex is selected) */ -static int edbm_rip_invoke__vert(bContext *C, wmOperator *op, wmEvent *event) +static int edbm_rip_invoke__vert(bContext *C, wmOperator *op, const wmEvent *event) { const int do_fill = RNA_boolean_get(op->ptr, "use_fill"); UnorderedLoopPair *fill_uloop_pairs = NULL; @@ -860,7 +860,7 @@ static int edbm_rip_invoke__vert(bContext *C, wmOperator *op, wmEvent *event) /** * This is the main edge ripping function */ -static int edbm_rip_invoke__edge(bContext *C, wmOperator *op, wmEvent *event) +static int edbm_rip_invoke__edge(bContext *C, wmOperator *op, const wmEvent *event) { const int do_fill = RNA_boolean_get(op->ptr, "use_fill"); UnorderedLoopPair *fill_uloop_pairs = NULL; @@ -988,7 +988,7 @@ static int edbm_rip_invoke__edge(bContext *C, wmOperator *op, wmEvent *event) } /* based on mouse cursor position, it defines how is being ripped */ -static int edbm_rip_invoke(bContext *C, wmOperator *op, wmEvent *event) +static int edbm_rip_invoke(bContext *C, wmOperator *op, const wmEvent *event) { Object *obedit = CTX_data_edit_object(C); BMEditMesh *em = BMEdit_FromObject(obedit); diff --git a/source/blender/editors/mesh/editmesh_select.c b/source/blender/editors/mesh/editmesh_select.c index a1f836ad037..ccf77b70ea0 100644 --- a/source/blender/editors/mesh/editmesh_select.c +++ b/source/blender/editors/mesh/editmesh_select.c @@ -923,7 +923,7 @@ static int edbm_select_mode_exec(bContext *C, wmOperator *op) } } -static int edbm_select_mode_invoke(bContext *C, wmOperator *op, wmEvent *event) +static int edbm_select_mode_invoke(bContext *C, wmOperator *op, const wmEvent *event) { /* detecting these options based on shift/ctrl here is weak, but it's done * to make this work when clicking buttons or menus */ @@ -1075,7 +1075,7 @@ void MESH_OT_loop_multi_select(wmOperatorType *ot) /* ***************** loop select (non modal) ************** */ -static void mouse_mesh_loop(bContext *C, int mval[2], short extend, short deselect, short toggle, short ring) +static void mouse_mesh_loop(bContext *C, const int mval[2], short extend, short deselect, short toggle, short ring) { ViewContext vc; BMEditMesh *em; @@ -1194,7 +1194,7 @@ static void mouse_mesh_loop(bContext *C, int mval[2], short extend, short desele } } -static int edbm_select_loop_invoke(bContext *C, wmOperator *op, wmEvent *event) +static int edbm_select_loop_invoke(bContext *C, wmOperator *op, const wmEvent *event) { view3d_operator_needs_opengl(C); @@ -1715,7 +1715,7 @@ static int mouse_mesh_shortest_path_face(ViewContext *vc) /* ******************* operator for edge and face tag ****************** */ -static int edbm_shortest_path_select_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *event) +static int edbm_shortest_path_select_invoke(bContext *C, wmOperator *UNUSED(op), const wmEvent *event) { ViewContext vc; BMEditMesh *em; @@ -2213,7 +2213,7 @@ static void linked_limit_default(bContext *C, wmOperator *op) } } -static int edbm_select_linked_pick_invoke(bContext *C, wmOperator *op, wmEvent *event) +static int edbm_select_linked_pick_invoke(bContext *C, wmOperator *op, const wmEvent *event) { Object *obedit = CTX_data_edit_object(C); ViewContext vc; diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index b862860c747..eb5e66cbfba 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -777,7 +777,7 @@ void MESH_OT_select_interior_faces(wmOperatorType *ot) } /* *************** add-click-mesh (extrude) operator ************** */ -static int edbm_dupli_extrude_cursor_invoke(bContext *C, wmOperator *op, wmEvent *event) +static int edbm_dupli_extrude_cursor_invoke(bContext *C, wmOperator *op, const wmEvent *event) { ViewContext vc; BMVert *v1; @@ -1509,7 +1509,7 @@ static int edbm_duplicate_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -static int edbm_duplicate_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) +static int edbm_duplicate_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event)) { WM_cursor_wait(1); edbm_duplicate_exec(C, op); @@ -3847,7 +3847,7 @@ static int edbm_spin_exec(bContext *C, wmOperator *op) } /* get center and axis, in global coords */ -static int edbm_spin_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) +static int edbm_spin_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event)) { Scene *scene = CTX_data_scene(C); View3D *v3d = CTX_wm_view3d(C); @@ -3971,7 +3971,7 @@ static int edbm_screw_exec(bContext *C, wmOperator *op) } /* get center and axis, in global coords */ -static int edbm_screw_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) +static int edbm_screw_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event)) { Scene *scene = CTX_data_scene(C); View3D *v3d = CTX_wm_view3d(C); @@ -4963,7 +4963,7 @@ static int edbm_bevel_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -static int edbm_bevel_invoke(bContext *C, wmOperator *op, wmEvent *event) +static int edbm_bevel_invoke(bContext *C, wmOperator *op, const wmEvent *event) { /* TODO make modal keymap (see fly mode) */ RegionView3D *rv3d = CTX_wm_region_view3d(C); @@ -5000,7 +5000,7 @@ static int edbm_bevel_invoke(bContext *C, wmOperator *op, wmEvent *event) return OPERATOR_RUNNING_MODAL; } -static float edbm_bevel_mval_factor(wmOperator *op, wmEvent *event) +static float edbm_bevel_mval_factor(wmOperator *op, const wmEvent *event) { BevelData *opdata = op->customdata; int use_dist = TRUE; @@ -5039,7 +5039,7 @@ static float edbm_bevel_mval_factor(wmOperator *op, wmEvent *event) return factor; } -static int edbm_bevel_modal(bContext *C, wmOperator *op, wmEvent *event) +static int edbm_bevel_modal(bContext *C, wmOperator *op, const wmEvent *event) { BevelData *opdata = op->customdata; int segments = RNA_int_get(op->ptr, "segments"); @@ -5345,7 +5345,7 @@ static int edbm_inset_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -static int edbm_inset_invoke(bContext *C, wmOperator *op, wmEvent *event) +static int edbm_inset_invoke(bContext *C, wmOperator *op, const wmEvent *event) { RegionView3D *rv3d = CTX_wm_region_view3d(C); InsetData *opdata; @@ -5375,7 +5375,7 @@ static int edbm_inset_invoke(bContext *C, wmOperator *op, wmEvent *event) return OPERATOR_RUNNING_MODAL; } -static int edbm_inset_modal(bContext *C, wmOperator *op, wmEvent *event) +static int edbm_inset_modal(bContext *C, wmOperator *op, const wmEvent *event) { InsetData *opdata = op->customdata; diff --git a/source/blender/editors/mesh/mesh_data.c b/source/blender/editors/mesh/mesh_data.c index 25560b3a33d..dbdce4c2f36 100644 --- a/source/blender/editors/mesh/mesh_data.c +++ b/source/blender/editors/mesh/mesh_data.c @@ -571,7 +571,7 @@ void MESH_OT_uv_texture_add(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } -static int drop_named_image_invoke(bContext *C, wmOperator *op, wmEvent *event) +static int drop_named_image_invoke(bContext *C, wmOperator *op, const wmEvent *event) { Main *bmain = CTX_data_main(C); Scene *scene = CTX_data_scene(C); |