diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-12-12 19:22:54 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-12-12 19:22:54 +0400 |
commit | d5c2a1f8f4c9d00d7bdb66e5c2a5f8602597f989 (patch) | |
tree | 46c65a7cd16c304bc8ac99104876e71210da5b4f /source/blender/editors/mesh | |
parent | 8e9a6871b421cc8b4682b4ce2c046610069791b1 (diff) |
remove context argument from EDBM_update_generic()
Diffstat (limited to 'source/blender/editors/mesh')
-rw-r--r-- | source/blender/editors/mesh/editmesh_add.c | 2 | ||||
-rw-r--r-- | source/blender/editors/mesh/editmesh_knife.c | 6 | ||||
-rw-r--r-- | source/blender/editors/mesh/editmesh_loopcut.c | 2 | ||||
-rw-r--r-- | source/blender/editors/mesh/editmesh_rip.c | 2 | ||||
-rw-r--r-- | source/blender/editors/mesh/editmesh_select.c | 22 | ||||
-rw-r--r-- | source/blender/editors/mesh/editmesh_slide.c | 4 | ||||
-rw-r--r-- | source/blender/editors/mesh/editmesh_tools.c | 140 | ||||
-rw-r--r-- | source/blender/editors/mesh/editmesh_utils.c | 5 |
8 files changed, 91 insertions, 92 deletions
diff --git a/source/blender/editors/mesh/editmesh_add.c b/source/blender/editors/mesh/editmesh_add.c index 94ff32c5aed..adcec5699a9 100644 --- a/source/blender/editors/mesh/editmesh_add.c +++ b/source/blender/editors/mesh/editmesh_add.c @@ -90,7 +90,7 @@ static void make_prim_finish(bContext *C, Object *obedit, int *state, int enter_ EDBM_selectmode_flush_ex(em, SCE_SELECT_VERTEX); /* only recalc editmode tessface if we are staying in editmode */ - EDBM_update_generic(C, em, !exit_editmode, TRUE); + EDBM_update_generic(em, !exit_editmode, TRUE); /* userdef */ if (exit_editmode) { diff --git a/source/blender/editors/mesh/editmesh_knife.c b/source/blender/editors/mesh/editmesh_knife.c index 31415cf98d2..189f5241a68 100644 --- a/source/blender/editors/mesh/editmesh_knife.c +++ b/source/blender/editors/mesh/editmesh_knife.c @@ -2830,7 +2830,7 @@ static void knife_make_cuts(KnifeTool_OpData *kcd) #endif /* called on tool confirmation */ -static void knifetool_finish(bContext *C, wmOperator *op) +static void knifetool_finish(wmOperator *op) { KnifeTool_OpData *kcd = op->customdata; @@ -2841,7 +2841,7 @@ static void knifetool_finish(bContext *C, wmOperator *op) #endif EDBM_mesh_normals_update(kcd->em); - EDBM_update_generic(C, kcd->em, TRUE, TRUE); + EDBM_update_generic(kcd->em, TRUE, TRUE); } /* copied from paint_image.c */ @@ -3129,7 +3129,7 @@ static int knifetool_modal(bContext *C, wmOperator *op, wmEvent *event) /* finish */ ED_region_tag_redraw(kcd->ar); - knifetool_finish(C, op); + knifetool_finish(op); knifetool_exit(C, op); ED_area_headerprint(CTX_wm_area(C), NULL); diff --git a/source/blender/editors/mesh/editmesh_loopcut.c b/source/blender/editors/mesh/editmesh_loopcut.c index 3efd823179e..7721f878ce6 100644 --- a/source/blender/editors/mesh/editmesh_loopcut.c +++ b/source/blender/editors/mesh/editmesh_loopcut.c @@ -335,7 +335,7 @@ static void ringsel_finish(bContext *C, wmOperator *op) use_only_quads, 0); /* tessface is already re-recalculated */ - EDBM_update_generic(C, em, FALSE, TRUE); + EDBM_update_generic(em, FALSE, TRUE); /* force edge slide to edge select mode in in face select mode */ if (em->selectmode & SCE_SELECT_FACE) { diff --git a/source/blender/editors/mesh/editmesh_rip.c b/source/blender/editors/mesh/editmesh_rip.c index 01a2579520a..4909561f677 100644 --- a/source/blender/editors/mesh/editmesh_rip.c +++ b/source/blender/editors/mesh/editmesh_rip.c @@ -1044,7 +1044,7 @@ static int edbm_rip_invoke(bContext *C, wmOperator *op, wmEvent *event) return OPERATOR_CANCELLED; } - EDBM_update_generic(C, em, TRUE, TRUE); + EDBM_update_generic(em, TRUE, TRUE); return OPERATOR_FINISHED; } diff --git a/source/blender/editors/mesh/editmesh_select.c b/source/blender/editors/mesh/editmesh_select.c index e3f918b66c9..6adcede9699 100644 --- a/source/blender/editors/mesh/editmesh_select.c +++ b/source/blender/editors/mesh/editmesh_select.c @@ -725,7 +725,7 @@ static int similar_face_select_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } - EDBM_update_generic(C, em, FALSE, FALSE); + EDBM_update_generic(em, FALSE, FALSE); /* we succeeded */ return OPERATOR_FINISHED; @@ -767,7 +767,7 @@ static int similar_edge_select_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } - EDBM_update_generic(C, em, FALSE, FALSE); + EDBM_update_generic(em, FALSE, FALSE); /* we succeeded */ return OPERATOR_FINISHED; @@ -812,7 +812,7 @@ static int similar_vert_select_exec(bContext *C, wmOperator *op) EDBM_selectmode_flush(em); - EDBM_update_generic(C, em, FALSE, FALSE); + EDBM_update_generic(em, FALSE, FALSE); /* we succeeded */ return OPERATOR_FINISHED; @@ -1431,7 +1431,7 @@ static int edgetag_shortest_path(Scene *scene, BMesh *bm, BMEdge *e_src, BMEdge /* ******************* mesh shortest path select, uses prev-selected edge ****************** */ /* since you want to create paths with multiple selects, it doesn't have extend option */ -static int mouse_mesh_shortest_path_edge(bContext *C, ViewContext *vc) +static int mouse_mesh_shortest_path_edge(ViewContext *vc) { BMEditMesh *em = vc->em; BMEdge *e_dst; @@ -1470,7 +1470,7 @@ static int mouse_mesh_shortest_path_edge(bContext *C, ViewContext *vc) BM_select_history_store(em->bm, e_dst); /* force drawmode for mesh */ - switch (CTX_data_tool_settings(C)->edge_mode) { + switch (vc->scene->toolsettings->edge_mode) { case EDGE_MODE_TAG_SEAM: me->drawflag |= ME_DRAWSEAMS; @@ -1487,7 +1487,7 @@ static int mouse_mesh_shortest_path_edge(bContext *C, ViewContext *vc) break; } - EDBM_update_generic(C, em, FALSE, FALSE); + EDBM_update_generic(em, FALSE, FALSE); return TRUE; } @@ -1644,7 +1644,7 @@ static int facetag_shortest_path(Scene *scene, BMesh *bm, BMFace *f_src, BMFace return 1; } -static int mouse_mesh_shortest_path_face(bContext *C, ViewContext *vc) +static int mouse_mesh_shortest_path_face(ViewContext *vc) { BMEditMesh *em = vc->em; BMFace *f_dst; @@ -1678,7 +1678,7 @@ static int mouse_mesh_shortest_path_face(bContext *C, ViewContext *vc) BM_active_face_set(em->bm, f_dst); - EDBM_update_generic(C, em, FALSE, FALSE); + EDBM_update_generic(em, FALSE, FALSE); return TRUE; } @@ -1703,7 +1703,7 @@ static int edbm_shortest_path_select_invoke(bContext *C, wmOperator *UNUSED(op), em = vc.em; if (em->selectmode & SCE_SELECT_EDGE) { - if (mouse_mesh_shortest_path_edge(C, &vc)) { + if (mouse_mesh_shortest_path_edge(&vc)) { return OPERATOR_FINISHED; } else { @@ -1711,7 +1711,7 @@ static int edbm_shortest_path_select_invoke(bContext *C, wmOperator *UNUSED(op), } } else if (em->selectmode & SCE_SELECT_FACE) { - if (mouse_mesh_shortest_path_face(C, &vc)) { + if (mouse_mesh_shortest_path_face(&vc)) { return OPERATOR_FINISHED; } else { @@ -2635,7 +2635,7 @@ static int edbm_select_nth_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } - EDBM_update_generic(C, em, FALSE, FALSE); + EDBM_update_generic(em, FALSE, FALSE); return OPERATOR_FINISHED; } diff --git a/source/blender/editors/mesh/editmesh_slide.c b/source/blender/editors/mesh/editmesh_slide.c index d5ca2e928da..eb0a21261ce 100644 --- a/source/blender/editors/mesh/editmesh_slide.c +++ b/source/blender/editors/mesh/editmesh_slide.c @@ -264,7 +264,7 @@ static void vtx_slide_confirm(bContext *C, wmOperator *op) EDBM_selectmode_flush(em); /* NC_GEOM | ND_DATA & Retess */ - EDBM_update_generic(C, em, TRUE, FALSE); + EDBM_update_generic(em, TRUE, FALSE); ED_region_tag_redraw(vso->active_region); } @@ -752,7 +752,7 @@ static int edbm_vertex_slide_exec_ex(bContext *C, wmOperator *op, const int do_u if (do_update) { /* Update Geometry */ - EDBM_update_generic(C, em, TRUE, FALSE); + EDBM_update_generic(em, TRUE, FALSE); } return OPERATOR_FINISHED; diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index 41d5cedbc2c..c04e74a717c 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -112,7 +112,7 @@ static int edbm_subdivide_exec(bContext *C, wmOperator *op) RNA_boolean_get(op->ptr, "quadtri"), TRUE, FALSE, RNA_int_get(op->ptr, "seed")); - EDBM_update_generic(C, em, TRUE, TRUE); + EDBM_update_generic(em, TRUE, TRUE); return OPERATOR_FINISHED; } @@ -181,7 +181,7 @@ static int edbm_unsubdivide_exec(bContext *C, wmOperator *op) } EDBM_selectmode_flush(em); - EDBM_update_generic(C, em, TRUE, TRUE); + EDBM_update_generic(em, TRUE, TRUE); return OPERATOR_FINISHED; } @@ -463,7 +463,7 @@ static int edbm_extrude_repeat_exec(bContext *C, wmOperator *op) EDBM_mesh_normals_update(em); - EDBM_update_generic(C, em, TRUE, TRUE); + EDBM_update_generic(em, TRUE, TRUE); return OPERATOR_FINISHED; } @@ -585,7 +585,7 @@ static int edbm_extrude_region_exec(bContext *C, wmOperator *op) * done.*/ EDBM_mesh_normals_update(em); - EDBM_update_generic(C, em, TRUE, TRUE); + EDBM_update_generic(em, TRUE, TRUE); return OPERATOR_FINISHED; } @@ -678,7 +678,7 @@ static int edbm_extrude_faces_exec(bContext *C, wmOperator *op) edbm_extrude_discrete_faces(em, op, BM_ELEM_SELECT, nor); - EDBM_update_generic(C, em, TRUE, TRUE); + EDBM_update_generic(em, TRUE, TRUE); return OPERATOR_FINISHED; } @@ -936,7 +936,7 @@ static int edbm_dupli_extrude_cursor_invoke(bContext *C, wmOperator *op, wmEvent * done. */ EDBM_mesh_normals_update(vc.em); - EDBM_update_generic(C, vc.em, TRUE, TRUE); + EDBM_update_generic(vc.em, TRUE, TRUE); return OPERATOR_FINISHED; } @@ -1001,7 +1001,7 @@ static int edbm_delete_exec(bContext *C, wmOperator *op) EDBM_flag_disable_all(em, BM_ELEM_SELECT); - EDBM_update_generic(C, em, TRUE, TRUE); + EDBM_update_generic(em, TRUE, TRUE); return OPERATOR_FINISHED; } @@ -1034,7 +1034,7 @@ static int edbm_collapse_edge_exec(bContext *C, wmOperator *op) if (!EDBM_op_callf(em, op, "collapse edges=%he", BM_ELEM_SELECT)) return OPERATOR_CANCELLED; - EDBM_update_generic(C, em, TRUE, TRUE); + EDBM_update_generic(em, TRUE, TRUE); return OPERATOR_FINISHED; } @@ -1062,7 +1062,7 @@ static int edbm_collapse_edge_loop_exec(bContext *C, wmOperator *op) if (!EDBM_op_callf(em, op, "dissolve_edge_loop edges=%he", BM_ELEM_SELECT)) return OPERATOR_CANCELLED; - EDBM_update_generic(C, em, TRUE, TRUE); + EDBM_update_generic(em, TRUE, TRUE); return OPERATOR_FINISHED; } @@ -1121,7 +1121,7 @@ static int edbm_add_edge_face_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } - EDBM_update_generic(C, em, TRUE, TRUE); + EDBM_update_generic(em, TRUE, TRUE); return OPERATOR_FINISHED; } @@ -1176,7 +1176,7 @@ static int edbm_mark_seam(bContext *C, wmOperator *op) } ED_uvedit_live_unwrap(scene, obedit); - EDBM_update_generic(C, em, TRUE, FALSE); + EDBM_update_generic(em, TRUE, FALSE); return OPERATOR_FINISHED; } @@ -1230,7 +1230,7 @@ static int edbm_mark_sharp(bContext *C, wmOperator *op) } } - EDBM_update_generic(C, em, TRUE, FALSE); + EDBM_update_generic(em, TRUE, FALSE); return OPERATOR_FINISHED; } @@ -1272,7 +1272,7 @@ static int edbm_vert_connect(bContext *C, wmOperator *op) else { EDBM_selectmode_flush(em); /* so newly created edges get the selection state from the vertex */ - EDBM_update_generic(C, em, TRUE, TRUE); + EDBM_update_generic(em, TRUE, TRUE); return len ? OPERATOR_FINISHED : OPERATOR_CANCELLED; } @@ -1310,7 +1310,7 @@ static int edbm_edge_split_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } - EDBM_update_generic(C, em, TRUE, TRUE); + EDBM_update_generic(em, TRUE, TRUE); return len ? OPERATOR_FINISHED : OPERATOR_CANCELLED; } @@ -1349,7 +1349,7 @@ static int edbm_duplicate_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } - EDBM_update_generic(C, em, TRUE, TRUE); + EDBM_update_generic(em, TRUE, TRUE); return OPERATOR_FINISHED; } @@ -1388,7 +1388,7 @@ static int edbm_flip_normals_exec(bContext *C, wmOperator *op) if (!EDBM_op_callf(em, op, "reverse_faces faces=%hf", BM_ELEM_SELECT)) return OPERATOR_CANCELLED; - EDBM_update_generic(C, em, TRUE, FALSE); + EDBM_update_generic(em, TRUE, FALSE); return OPERATOR_FINISHED; } @@ -1469,7 +1469,7 @@ static int edbm_edge_rotate_selected_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } - EDBM_update_generic(C, em, TRUE, TRUE); + EDBM_update_generic(em, TRUE, TRUE); return OPERATOR_FINISHED; } @@ -1500,7 +1500,7 @@ static int edbm_hide_exec(bContext *C, wmOperator *op) EDBM_mesh_hide(em, RNA_boolean_get(op->ptr, "unselected")); - EDBM_update_generic(C, em, TRUE, FALSE); + EDBM_update_generic(em, TRUE, FALSE); return OPERATOR_FINISHED; } @@ -1530,7 +1530,7 @@ static int edbm_reveal_exec(bContext *C, wmOperator *UNUSED(op)) EDBM_mesh_reveal(em); - EDBM_update_generic(C, em, TRUE, FALSE); + EDBM_update_generic(em, TRUE, FALSE); return OPERATOR_FINISHED; } @@ -1563,7 +1563,7 @@ static int edbm_normals_make_consistent_exec(bContext *C, wmOperator *op) if (RNA_boolean_get(op->ptr, "inside")) EDBM_op_callf(em, op, "reverse_faces faces=%hf", BM_ELEM_SELECT); - EDBM_update_generic(C, em, TRUE, FALSE); + EDBM_update_generic(em, TRUE, FALSE); return OPERATOR_FINISHED; } @@ -1645,7 +1645,7 @@ static int edbm_do_smooth_vertex_exec(bContext *C, wmOperator *op) EDBM_verts_mirror_cache_end(em); } - EDBM_update_generic(C, em, TRUE, FALSE); + EDBM_update_generic(em, TRUE, FALSE); return OPERATOR_FINISHED; } @@ -1721,7 +1721,7 @@ static int edbm_do_smooth_laplacian_vertex_exec(bContext *C, wmOperator *op) EDBM_verts_mirror_cache_end(em); } - EDBM_update_generic(C, em, TRUE, FALSE); + EDBM_update_generic(em, TRUE, FALSE); return OPERATOR_FINISHED; } @@ -1775,7 +1775,7 @@ static int edbm_faces_shade_smooth_exec(bContext *C, wmOperator *UNUSED(op)) mesh_set_smooth_faces(em, 1); - EDBM_update_generic(C, em, FALSE, FALSE); + EDBM_update_generic(em, FALSE, FALSE); return OPERATOR_FINISHED; } @@ -1802,7 +1802,7 @@ static int edbm_faces_shade_flat_exec(bContext *C, wmOperator *UNUSED(op)) mesh_set_smooth_faces(em, 0); - EDBM_update_generic(C, em, FALSE, FALSE); + EDBM_update_generic(em, FALSE, FALSE); return OPERATOR_FINISHED; } @@ -1845,7 +1845,7 @@ static int edbm_rotate_uvs_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } - EDBM_update_generic(C, em, FALSE, FALSE); + EDBM_update_generic(em, FALSE, FALSE); /* we succeeded */ return OPERATOR_FINISHED; @@ -1868,7 +1868,7 @@ static int edbm_reverse_uvs_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } - EDBM_update_generic(C, em, FALSE, FALSE); + EDBM_update_generic(em, FALSE, FALSE); /* we succeeded */ return OPERATOR_FINISHED; @@ -1895,7 +1895,7 @@ static int edbm_rotate_colors_exec(bContext *C, wmOperator *op) } /* dependencies graph and notification stuff */ - EDBM_update_generic(C, em, FALSE, FALSE); + EDBM_update_generic(em, FALSE, FALSE); /* we succeeded */ return OPERATOR_FINISHED; @@ -1919,7 +1919,7 @@ static int edbm_reverse_colors_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } - EDBM_update_generic(C, em, FALSE, FALSE); + EDBM_update_generic(em, FALSE, FALSE); /* we succeeded */ return OPERATOR_FINISHED; @@ -2104,7 +2104,7 @@ static int edbm_merge_exec(bContext *C, wmOperator *op) if (!status) return OPERATOR_CANCELLED; - EDBM_update_generic(C, em, TRUE, TRUE); + EDBM_update_generic(em, TRUE, TRUE); return OPERATOR_FINISHED; } @@ -2221,7 +2221,7 @@ static int edbm_remove_doubles_exec(bContext *C, wmOperator *op) count = totvert_orig - em->bm->totvert; BKE_reportf(op->reports, RPT_INFO, "Removed %d vertices", count); - EDBM_update_generic(C, em, TRUE, TRUE); + EDBM_update_generic(em, TRUE, TRUE); return OPERATOR_FINISHED; } @@ -2328,7 +2328,7 @@ static int edbm_select_vertex_path_exec(bContext *C, wmOperator *op) EDBM_selectmode_flush(em); - EDBM_update_generic(C, em, FALSE, FALSE); + EDBM_update_generic(em, FALSE, FALSE); /* we succeeded */ return OPERATOR_FINISHED; @@ -2403,7 +2403,7 @@ static int edbm_shape_propagate_to_all_exec(bContext *C, wmOperator *op) shape_propagate(em, op); - EDBM_update_generic(C, em, FALSE, FALSE); + EDBM_update_generic(em, FALSE, FALSE); return OPERATOR_FINISHED; } @@ -2474,7 +2474,7 @@ static int edbm_blend_from_shape_exec(bContext *C, wmOperator *op) } } - EDBM_update_generic(C, em, TRUE, FALSE); + EDBM_update_generic(em, TRUE, FALSE); return OPERATOR_FINISHED; } @@ -2665,7 +2665,7 @@ static int edbm_solidify_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } - EDBM_update_generic(C, em, TRUE, TRUE); + EDBM_update_generic(em, TRUE, TRUE); return OPERATOR_FINISHED; } @@ -2990,7 +2990,7 @@ static int edbm_knife_cut_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } - EDBM_update_generic(C, em, TRUE, TRUE); + EDBM_update_generic(em, TRUE, TRUE); return OPERATOR_FINISHED; } @@ -3232,7 +3232,7 @@ static int edbm_separate_exec(bContext *C, wmOperator *op) else BLI_assert(0); if (retval) { - EDBM_update_generic(C, em, TRUE, TRUE); + EDBM_update_generic(em, TRUE, TRUE); } } else { @@ -3332,7 +3332,7 @@ static int edbm_fill_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } - EDBM_update_generic(C, em, TRUE, TRUE); + EDBM_update_generic(em, TRUE, TRUE); return OPERATOR_FINISHED; @@ -3361,7 +3361,7 @@ static int edbm_beautify_fill_exec(bContext *C, wmOperator *op) if (!EDBM_op_callf(em, op, "beautify_fill faces=%hf", BM_ELEM_SELECT)) return OPERATOR_CANCELLED; - EDBM_update_generic(C, em, TRUE, TRUE); + EDBM_update_generic(em, TRUE, TRUE); return OPERATOR_FINISHED; } @@ -3392,7 +3392,7 @@ static int edbm_quads_convert_to_tris_exec(bContext *C, wmOperator *op) if (!EDBM_op_callf(em, op, "triangulate faces=%hf use_beauty=%b", BM_ELEM_SELECT, use_beauty)) return OPERATOR_CANCELLED; - EDBM_update_generic(C, em, TRUE, TRUE); + EDBM_update_generic(em, TRUE, TRUE); return OPERATOR_FINISHED; } @@ -3433,7 +3433,7 @@ static int edbm_tris_convert_to_quads_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } - EDBM_update_generic(C, em, TRUE, TRUE); + EDBM_update_generic(em, TRUE, TRUE); return OPERATOR_FINISHED; } @@ -3489,7 +3489,7 @@ static int edbm_dissolve_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } - EDBM_update_generic(C, em, TRUE, TRUE); + EDBM_update_generic(em, TRUE, TRUE); return OPERATOR_FINISHED; } @@ -3561,7 +3561,7 @@ static int edbm_dissolve_limited_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } - EDBM_update_generic(C, em, TRUE, TRUE); + EDBM_update_generic(em, TRUE, TRUE); return OPERATOR_FINISHED; } @@ -3606,7 +3606,7 @@ static int edbm_split_exec(bContext *C, wmOperator *op) /* Geometry has changed, need to recalc normals and looptris */ EDBM_mesh_normals_update(em); - EDBM_update_generic(C, em, TRUE, TRUE); + EDBM_update_generic(em, TRUE, TRUE); return OPERATOR_FINISHED; } @@ -3665,7 +3665,7 @@ static int edbm_spin_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } - EDBM_update_generic(C, em, TRUE, TRUE); + EDBM_update_generic(em, TRUE, TRUE); return OPERATOR_FINISHED; } @@ -3788,7 +3788,7 @@ static int edbm_screw_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } - EDBM_update_generic(C, em, TRUE, TRUE); + EDBM_update_generic(em, TRUE, TRUE); return OPERATOR_FINISHED; } @@ -4603,7 +4603,7 @@ static int edbm_noise_exec(bContext *C, wmOperator *op) EDBM_mesh_normals_update(em); - EDBM_update_generic(C, em, TRUE, FALSE); + EDBM_update_generic(em, TRUE, FALSE); return OPERATOR_FINISHED; } @@ -4762,7 +4762,7 @@ static int edbm_bevel_init(bContext *C, wmOperator *op, int is_modal) return 1; } -static int edbm_bevel_calc(bContext *C, wmOperator *op) +static int edbm_bevel_calc(wmOperator *op) { BevelData *opdata = op->customdata; BMEditMesh *em = opdata->em; @@ -4827,7 +4827,7 @@ static int edbm_bevel_calc(bContext *C, wmOperator *op) EDBM_mesh_normals_update(opdata->em); - EDBM_update_generic(C, opdata->em, TRUE, TRUE); + EDBM_update_generic(opdata->em, TRUE, TRUE); return 1; } @@ -4859,7 +4859,7 @@ static int edbm_bevel_cancel(bContext *C, wmOperator *op) BevelData *opdata = op->customdata; if (opdata->is_modal) { EDBM_redo_state_free(&opdata->mesh_backup, opdata->em, TRUE); - EDBM_update_generic(C, opdata->em, FALSE, TRUE); + EDBM_update_generic(opdata->em, FALSE, TRUE); } edbm_bevel_exit(C, op); @@ -4877,7 +4877,7 @@ static int edbm_bevel_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } - if (!edbm_bevel_calc(C, op)) { + if (!edbm_bevel_calc(op)) { edbm_bevel_cancel(C, op); return OPERATOR_CANCELLED; } @@ -4914,7 +4914,7 @@ static int edbm_bevel_invoke(bContext *C, wmOperator *op, wmEvent *event) edbm_bevel_update_header(op, C); - if (!edbm_bevel_calc(C, op)) { + if (!edbm_bevel_calc(op)) { edbm_bevel_cancel(C, op); return OPERATOR_CANCELLED; } @@ -4984,7 +4984,7 @@ static int edbm_bevel_modal(bContext *C, wmOperator *op, wmEvent *event) float value = RNA_float_get(op->ptr, "offset"); applyNumInput(&opdata->num_input, &value); RNA_float_set(op->ptr, "offset", value); - edbm_bevel_calc(C, op); + edbm_bevel_calc(op); edbm_bevel_update_header(op, C); return OPERATOR_RUNNING_MODAL; } @@ -5017,7 +5017,7 @@ static int edbm_bevel_modal(bContext *C, wmOperator *op, wmEvent *event) RNA_float_set(op->ptr, "percent", factor); #endif - edbm_bevel_calc(C, op); + edbm_bevel_calc(op); edbm_bevel_update_header(op, C); } break; @@ -5025,7 +5025,7 @@ static int edbm_bevel_modal(bContext *C, wmOperator *op, wmEvent *event) case LEFTMOUSE: case PADENTER: case RETKEY: - edbm_bevel_calc(C, op); + edbm_bevel_calc(op); edbm_bevel_exit(C, op); return OPERATOR_FINISHED; @@ -5037,7 +5037,7 @@ static int edbm_bevel_modal(bContext *C, wmOperator *op, wmEvent *event) segments++; RNA_int_set(op->ptr, "segments", segments); - edbm_bevel_calc(C, op); + edbm_bevel_calc(op); edbm_bevel_update_header(op, C); break; @@ -5048,7 +5048,7 @@ static int edbm_bevel_modal(bContext *C, wmOperator *op, wmEvent *event) segments = max_ii(segments - 1, 1); RNA_int_set(op->ptr, "segments", segments); - edbm_bevel_calc(C, op); + edbm_bevel_calc(op); edbm_bevel_update_header(op, C); break; @@ -5140,7 +5140,7 @@ static int edbm_bridge_edge_loops_exec(bContext *C, wmOperator *op) } else { - EDBM_update_generic(C, em, TRUE, TRUE); + EDBM_update_generic(em, TRUE, TRUE); return OPERATOR_FINISHED; } } @@ -5263,7 +5263,7 @@ static int edbm_inset_cancel(bContext *C, wmOperator *op) opdata = op->customdata; if (opdata->is_modal) { EDBM_redo_state_free(&opdata->backup, opdata->em, TRUE); - EDBM_update_generic(C, opdata->em, FALSE, TRUE); + EDBM_update_generic(opdata->em, FALSE, TRUE); } edbm_inset_exit(C, op); @@ -5273,7 +5273,7 @@ static int edbm_inset_cancel(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } -static int edbm_inset_calc(bContext *C, wmOperator *op) +static int edbm_inset_calc(wmOperator *op) { InsetData *opdata; BMEditMesh *em; @@ -5318,7 +5318,7 @@ static int edbm_inset_calc(bContext *C, wmOperator *op) return 0; } else { - EDBM_update_generic(C, em, TRUE, TRUE); + EDBM_update_generic(em, TRUE, TRUE); return 1; } } @@ -5327,7 +5327,7 @@ static int edbm_inset_exec(bContext *C, wmOperator *op) { edbm_inset_init(C, op, FALSE); - if (!edbm_inset_calc(C, op)) { + if (!edbm_inset_calc(op)) { edbm_inset_exit(C, op); return OPERATOR_CANCELLED; } @@ -5358,7 +5358,7 @@ static int edbm_inset_invoke(bContext *C, wmOperator *op, wmEvent *event) opdata->initial_length = len_v2(mlen); opdata->pixel_size = rv3d ? ED_view3d_pixel_size(rv3d, center_3d) : 1.0f; - edbm_inset_calc(C, op); + edbm_inset_calc(op); edbm_inset_update_header(op, C); @@ -5381,7 +5381,7 @@ static int edbm_inset_modal(bContext *C, wmOperator *op, wmEvent *event) RNA_float_set(op->ptr, "thickness", amounts[0]); RNA_float_set(op->ptr, "depth", amounts[1]); - if (edbm_inset_calc(C, op)) { + if (edbm_inset_calc(op)) { edbm_inset_update_header(op, C); return OPERATOR_RUNNING_MODAL; } @@ -5422,7 +5422,7 @@ static int edbm_inset_modal(bContext *C, wmOperator *op, wmEvent *event) RNA_float_set(op->ptr, "thickness", amount); } - if (edbm_inset_calc(C, op)) + if (edbm_inset_calc(op)) edbm_inset_update_header(op, C); else { edbm_inset_cancel(C, op); @@ -5434,7 +5434,7 @@ static int edbm_inset_modal(bContext *C, wmOperator *op, wmEvent *event) case LEFTMOUSE: case PADENTER: case RETKEY: - edbm_inset_calc(C, op); + edbm_inset_calc(op); edbm_inset_exit(C, op); return OPERATOR_FINISHED; @@ -5483,7 +5483,7 @@ static int edbm_inset_modal(bContext *C, wmOperator *op, wmEvent *event) if (event->val == KM_PRESS) { int use_outset = RNA_boolean_get(op->ptr, "use_outset"); RNA_boolean_set(op->ptr, "use_outset", !use_outset); - if (edbm_inset_calc(C, op)) { + if (edbm_inset_calc(op)) { edbm_inset_update_header(op, C); } else { @@ -5496,7 +5496,7 @@ static int edbm_inset_modal(bContext *C, wmOperator *op, wmEvent *event) if (event->val == KM_PRESS) { int use_boundary = RNA_boolean_get(op->ptr, "use_boundary"); RNA_boolean_set(op->ptr, "use_boundary", !use_boundary); - if (edbm_inset_calc(C, op)) { + if (edbm_inset_calc(op)) { edbm_inset_update_header(op, C); } else { @@ -5581,7 +5581,7 @@ static int edbm_wireframe_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } else { - EDBM_update_generic(C, em, TRUE, TRUE); + EDBM_update_generic(em, TRUE, TRUE); return OPERATOR_FINISHED; } } @@ -5671,7 +5671,7 @@ static int edbm_convex_hull_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } else { - EDBM_update_generic(C, em, TRUE, TRUE); + EDBM_update_generic(em, TRUE, TRUE); EDBM_selectmode_flush(em); return OPERATOR_FINISHED; } @@ -5726,7 +5726,7 @@ static int mesh_symmetrize_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } else { - EDBM_update_generic(C, em, TRUE, TRUE); + EDBM_update_generic(em, TRUE, TRUE); EDBM_selectmode_flush(em); return OPERATOR_FINISHED; } diff --git a/source/blender/editors/mesh/editmesh_utils.c b/source/blender/editors/mesh/editmesh_utils.c index 9852283430a..a07fb4ea66e 100644 --- a/source/blender/editors/mesh/editmesh_utils.c +++ b/source/blender/editors/mesh/editmesh_utils.c @@ -1342,13 +1342,12 @@ void EDBM_mesh_reveal(BMEditMesh *em) /* so many tools call these that we better make it a generic function. */ -void EDBM_update_generic(bContext *C, BMEditMesh *em, - const short do_tessface, const short is_destructive) +void EDBM_update_generic(BMEditMesh *em, const short do_tessface, const short is_destructive) { Object *ob = em->ob; /* order of calling isn't important */ DAG_id_tag_update(ob->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM | ND_DATA, ob->data); + WM_main_add_notifier(NC_GEOM | ND_DATA, ob->data); if (do_tessface) { BMEdit_RecalcTessellation(em); |