diff options
author | Julian Eisel <eiseljulian@gmail.com> | 2019-08-10 14:24:26 +0300 |
---|---|---|
committer | Julian Eisel <eiseljulian@gmail.com> | 2019-08-10 14:24:26 +0300 |
commit | b9898ebde44d6584ea37a05aaeca8760d31ccc7b (patch) | |
tree | e6dfc796cc82b4b8b8c248c4ff29d2e2047ff84c /source/blender/editors/mesh/editmesh_tools.c | |
parent | b17380971a144896b34b7863a82bbda3ff68a39f (diff) | |
parent | 553b581f25c1782c4231816965cd3f6ce58a449a (diff) |
Merge branch 'master' into filebrowser_redesign
Diffstat (limited to 'source/blender/editors/mesh/editmesh_tools.c')
-rw-r--r-- | source/blender/editors/mesh/editmesh_tools.c | 37 |
1 files changed, 29 insertions, 8 deletions
diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index 34c83263cac..cb147772b6a 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -411,7 +411,7 @@ void MESH_OT_unsubdivide(wmOperatorType *ot) ot->srna, "iterations", 2, 1, 1000, "Iterations", "Number of times to unsubdivide", 1, 100); } -void EDBM_project_snap_verts(bContext *C, ARegion *ar, BMEditMesh *em) +void EDBM_project_snap_verts(bContext *C, Depsgraph *depsgraph, ARegion *ar, BMEditMesh *em) { Main *bmain = CTX_data_main(C); Object *obedit = em->ob; @@ -421,7 +421,7 @@ void EDBM_project_snap_verts(bContext *C, ARegion *ar, BMEditMesh *em) ED_view3d_init_mats_rv3d(obedit, ar->regiondata); struct SnapObjectContext *snap_context = ED_transform_snap_object_context_create_view3d( - bmain, CTX_data_scene(C), CTX_data_depsgraph(C), 0, ar, CTX_wm_view3d(C)); + bmain, CTX_data_scene(C), depsgraph, 0, ar, CTX_wm_view3d(C)); BM_ITER_MESH (eve, &iter, em->bm, BM_VERTS_OF_MESH) { if (BM_elem_flag_test(eve, BM_ELEM_SELECT)) { @@ -7347,6 +7347,7 @@ static int mesh_symmetry_snap_exec(bContext *C, wmOperator *op) } } } + EDBM_update_generic(em, false, false); /* No need to end cache, just free the array. */ MEM_freeN(index); @@ -7578,7 +7579,9 @@ void MESH_OT_mark_freestyle_face(wmOperatorType *ot) #endif /* WITH_FREESTYLE */ -/********************** Loop normals editing tools modal map. **********************/ +/* -------------------------------------------------------------------- */ +/** \name Loop Normals Editing Tools Modal Map + * \{ */ /* NOTE: these defines are saved in keymap files, do not change values but just add new ones */ /* NOTE: We could add more here, like e.g. a switch between local or global coordinates of target, @@ -8126,7 +8129,11 @@ void MESH_OT_point_normals(struct wmOperatorType *ot) 1.0f); } -/********************** Split/Merge Loop Normals **********************/ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Split/Merge Loop Normals + * \{ */ static void normals_merge(BMesh *bm, BMLoopNorEditDataArray *lnors_ed_arr) { @@ -8333,7 +8340,11 @@ void MESH_OT_split_normals(struct wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } -/********************** Average Loop Normals **********************/ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Average Loop Normals + * \{ */ enum { EDBM_CLNOR_AVERAGE_LOOP = 1, @@ -8561,7 +8572,11 @@ void MESH_OT_average_normals(struct wmOperatorType *ot) 5); } -/********************** Custom Normal Interface Tools **********************/ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Custom Normal Interface Tools + * \{ */ enum { EDBM_CLNOR_TOOLS_COPY = 1, @@ -8616,7 +8631,7 @@ static int edbm_normals_tools_exec(bContext *C, wmOperator *op) switch (mode) { case EDBM_CLNOR_TOOLS_COPY: - if (bm->totfacesel == 0 || bm->totvertsel == 0) { + if (bm->totfacesel == 0 && bm->totvertsel == 0) { BM_loop_normal_editdata_array_free(lnors_ed_arr); continue; } @@ -9013,7 +9028,11 @@ void MESH_OT_smoothen_normals(struct wmOperatorType *ot) 1.0f); } -/********************** Weighted Normal Modifier Face Strength **********************/ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Weighted Normal Modifier Face Strength + * \{ */ static int edbm_mod_weighted_strength_exec(bContext *C, wmOperator *op) { @@ -9104,3 +9123,5 @@ void MESH_OT_mod_weighted_strength(struct wmOperatorType *ot) "Face Strength", "Strength to use for assigning or selecting face influence for weighted normal modifier"); } + +/** \} */ |