Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/transform/transform_gizmo_3d.c
| Show First 20 Lines • Show All 1,316 Lines • ▼ Show 20 Lines | if (t->mode == TFM_ROTATION && t->spacetype == SPACE_VIEW3D) { | ||||
| float scale = UI_DPI_FAC * U.gizmo_size; | float scale = UI_DPI_FAC * U.gizmo_size; | ||||
| int axis_idx; | int axis_idx; | ||||
| const TransCon *tc = &(t->con); | const TransCon *tc = &(t->con); | ||||
| if (tc->mode & CON_APPLY) { | if (tc->mode & CON_APPLY) { | ||||
| if (tc->mode & CON_AXIS0) { | if (tc->mode & CON_AXIS0) { | ||||
| axis_idx = MAN_AXIS_ROT_X; | axis_idx = MAN_AXIS_ROT_X; | ||||
| copy_v3_v3(mat_basis[2], t->spacemtx[0]); | negate_v3_v3(mat_basis[2], t->spacemtx[0]); | ||||
| } | } | ||||
| else if (tc->mode & CON_AXIS1) { | else if (tc->mode & CON_AXIS1) { | ||||
| axis_idx = MAN_AXIS_ROT_Y; | axis_idx = MAN_AXIS_ROT_Y; | ||||
| copy_v3_v3(mat_basis[2], t->spacemtx[1]); | negate_v3_v3(mat_basis[2], t->spacemtx[1]); | ||||
| } | } | ||||
| else { | else { | ||||
| BLI_assert((tc->mode & CON_AXIS2) != 0); | BLI_assert((tc->mode & CON_AXIS2) != 0); | ||||
| axis_idx = MAN_AXIS_ROT_Z; | axis_idx = MAN_AXIS_ROT_Z; | ||||
| copy_v3_v3(mat_basis[2], t->spacemtx[2]); | negate_v3_v3(mat_basis[2], t->spacemtx[2]); | ||||
| } | } | ||||
| } | } | ||||
| else { | else { | ||||
| axis_idx = MAN_AXIS_ROT_C; | axis_idx = MAN_AXIS_ROT_C; | ||||
| copy_v3_v3(mat_basis[2], t->spacemtx[t->orient_axis]); | copy_v3_v3(mat_basis[2], t->spacemtx[t->orient_axis]); | ||||
| scale *= 1.2f; | scale *= 1.2f; | ||||
| line_with -= 1.0f; | line_with -= 1.0f; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 1,143 Lines • Show Last 20 Lines | |||||