Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/gizmo_library/gizmo_types/move3d_gizmo.c
| Show First 20 Lines • Show All 272 Lines • ▼ Show 20 Lines | if (inter->snap_context_v3d) { | ||||
| float dist_px = MVAL_MAX_PX_DIST * U.pixelsize; | float dist_px = MVAL_MAX_PX_DIST * U.pixelsize; | ||||
| const float mval_fl[2] = {UNPACK2(event->mval)}; | const float mval_fl[2] = {UNPACK2(event->mval)}; | ||||
| float co[3]; | float co[3]; | ||||
| if (ED_transform_snap_object_project_view3d( | if (ED_transform_snap_object_project_view3d( | ||||
| inter->snap_context_v3d, | inter->snap_context_v3d, | ||||
| CTX_data_ensure_evaluated_depsgraph(C), | CTX_data_ensure_evaluated_depsgraph(C), | ||||
| region, | region, | ||||
| CTX_wm_view3d(C), | CTX_wm_view3d(C), | ||||
| (SCE_SNAP_MODE_VERTEX | SCE_SNAP_MODE_EDGE | SCE_SNAP_MODE_FACE), | (SCE_SNAP_MODE_VERTEX | SCE_SNAP_MODE_EDGE | SCE_SNAP_MODE_FACE_RAYCAST), | ||||
| &(const struct SnapObjectParams){ | &(const struct SnapObjectParams){ | ||||
| .snap_target_select = SCE_SNAP_TARGET_ALL, | .snap_target_select = SCE_SNAP_TARGET_ALL, | ||||
| .edit_mode_type = SNAP_GEOM_EDIT, | .edit_mode_type = SNAP_GEOM_EDIT, | ||||
| .use_occlusion_test = true, | .use_occlusion_test = true, | ||||
| }, | }, | ||||
| NULL, | |||||
| mval_fl, | mval_fl, | ||||
| NULL, | NULL, | ||||
| &dist_px, | &dist_px, | ||||
| co, | co, | ||||
| NULL)) { | NULL)) { | ||||
| float matrix_space_inv[4][4]; | float matrix_space_inv[4][4]; | ||||
| invert_m4_m4(matrix_space_inv, gz->matrix_space); | invert_m4_m4(matrix_space_inv, gz->matrix_space); | ||||
| mul_v3_m4v3(move->prop_co, matrix_space_inv, co); | mul_v3_m4v3(move->prop_co, matrix_space_inv, co); | ||||
| ▲ Show 20 Lines • Show All 177 Lines • Show Last 20 Lines | |||||