Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/mesh/editmesh_tools.c
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
| Show First 20 Lines • Show All 7,817 Lines • ▼ Show 20 Lines | static void point_normals_apply(bContext *C, wmOperator *op, float target[3], const bool do_reset) | ||||
| } | } | ||||
| } | } | ||||
| static int edbm_point_normals_modal(bContext *C, wmOperator *op, const wmEvent *event) | static int edbm_point_normals_modal(bContext *C, wmOperator *op, const wmEvent *event) | ||||
| { | { | ||||
| View3D *v3d = CTX_wm_view3d(C); | View3D *v3d = CTX_wm_view3d(C); | ||||
| Scene *scene = CTX_data_scene(C); | Scene *scene = CTX_data_scene(C); | ||||
| Object *obedit = CTX_data_edit_object(C); | Object *obedit = CTX_data_edit_object(C); | ||||
| if (!obedit) { | |||||
| /* can happen if we switch to objectmode while in modal, not sure if a modeswitch | |||||
| * should handle this in a more generic way (like kill all modals)? | |||||
| * or if we should specifically prevent switching out of editmode here? | |||||
| * (doing it like this will leak memory btw) */ | |||||
| return OPERATOR_CANCELLED; | |||||
| } | |||||
| BMEditMesh *em = BKE_editmesh_from_object(obedit); | BMEditMesh *em = BKE_editmesh_from_object(obedit); | ||||
| BMesh *bm = em->bm; | BMesh *bm = em->bm; | ||||
| float target[3]; | float target[3]; | ||||
| int ret = OPERATOR_PASS_THROUGH; | int ret = OPERATOR_PASS_THROUGH; | ||||
| int mode = RNA_enum_get(op->ptr, "mode"); | int mode = RNA_enum_get(op->ptr, "mode"); | ||||
| int new_mode = mode; | int new_mode = mode; | ||||
| ▲ Show 20 Lines • Show All 1,290 Lines • Show Last 20 Lines | |||||