Differential D3007 Diff 9853 source/blender/editors/manipulator_library/manipulator_types/arrow3d_manipulator.c
Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/manipulator_library/manipulator_types/arrow3d_manipulator.c
| Show First 20 Lines • Show All 256 Lines • ▼ Show 20 Lines | static int manipulator_arrow_modal( | ||||
| float arrow_no[3]; | float arrow_no[3]; | ||||
| copy_v3_v3(arrow_co, inter->init_matrix_basis[3]); | copy_v3_v3(arrow_co, inter->init_matrix_basis[3]); | ||||
| normalize_v3_v3(arrow_no, arrow->manipulator.matrix_basis[2]); | normalize_v3_v3(arrow_no, arrow->manipulator.matrix_basis[2]); | ||||
| int ok = 0; | int ok = 0; | ||||
| for (int j = 0; j < 2; j++) { | for (int j = 0; j < 2; j++) { | ||||
| if (ED_view3d_win_to_ray( | if (ED_view3d_win_to_ray( | ||||
| CTX_data_depsgraph(C), | |||||
| ar, v3d, proj[j].mval, | ar, v3d, proj[j].mval, | ||||
| proj[j].ray_origin, proj[j].ray_direction, false)) | proj[j].ray_origin, proj[j].ray_direction, false)) | ||||
| { | { | ||||
| /* Force Y axis if we're view aligned */ | /* Force Y axis if we're view aligned */ | ||||
| if (j == 0) { | if (j == 0) { | ||||
| if (RAD2DEGF(acosf(dot_v3v3(proj[j].ray_direction, arrow->manipulator.matrix_basis[2]))) < 5.0f) { | if (RAD2DEGF(acosf(dot_v3v3(proj[j].ray_direction, arrow->manipulator.matrix_basis[2]))) < 5.0f) { | ||||
| normalize_v3_v3(arrow_no, rv3d->viewinv[1]); | normalize_v3_v3(arrow_no, rv3d->viewinv[1]); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 205 Lines • Show Last 20 Lines | |||||