Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/mesh/editmesh_utils.c
| Show First 20 Lines • Show All 1,640 Lines • ▼ Show 20 Lines | if (BM_elem_flag_test(eve, BM_ELEM_SELECT)) { | ||||
| float mval[2], co_proj[3]; | float mval[2], co_proj[3]; | ||||
| if (ED_view3d_project_float_object(region, eve->co, mval, V3D_PROJ_TEST_NOP) == | if (ED_view3d_project_float_object(region, eve->co, mval, V3D_PROJ_TEST_NOP) == | ||||
| V3D_PROJ_RET_OK) { | V3D_PROJ_RET_OK) { | ||||
| if (ED_transform_snap_object_project_view3d( | if (ED_transform_snap_object_project_view3d( | ||||
| snap_context, | snap_context, | ||||
| depsgraph, | depsgraph, | ||||
| region, | region, | ||||
| CTX_wm_view3d(C), | CTX_wm_view3d(C), | ||||
| SCE_SNAP_MODE_FACE, | SCE_SNAP_MODE_FACE_RAYCAST, | ||||
| &(const struct SnapObjectParams){ | &(const struct SnapObjectParams){ | ||||
| .snap_target_select = SCE_SNAP_TARGET_NOT_ACTIVE, | .snap_target_select = SCE_SNAP_TARGET_NOT_ACTIVE, | ||||
| .edit_mode_type = SNAP_GEOM_FINAL, | .edit_mode_type = SNAP_GEOM_FINAL, | ||||
| .use_occlusion_test = true, | .use_occlusion_test = true, | ||||
| }, | }, | ||||
| NULL, | |||||
| mval, | mval, | ||||
| NULL, | NULL, | ||||
| NULL, | NULL, | ||||
| co_proj, | co_proj, | ||||
| NULL)) { | NULL)) { | ||||
| mul_v3_m4v3(eve->co, obedit->imat, co_proj); | mul_v3_m4v3(eve->co, obedit->imat, co_proj); | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| ED_transform_snap_object_context_destroy(snap_context); | ED_transform_snap_object_context_destroy(snap_context); | ||||
| } | } | ||||
| /** \} */ | /** \} */ | ||||