Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/transform/transform_mode_resize.c
| Show First 20 Lines • Show All 275 Lines • ▼ Show 20 Lines | if (t->flag & T_CLIP_UV && clip_uv_transform_resize(t, t->values_final)) { | ||||
| } | } | ||||
| } | } | ||||
| recalcData(t); | recalcData(t); | ||||
| ED_area_status_text(t->area, str); | ED_area_status_text(t->area, str); | ||||
| } | } | ||||
| static void resize_transform_matrix_fn(struct TransInfo *t, float mat_xform[4][4]) | |||||
| { | |||||
| float mat4[4][4]; | |||||
| copy_m4_m3(mat4, t->mat); | |||||
| transform_pivot_set_m4(mat4, t->center_global); | |||||
| mul_m4_m4m4(mat_xform, mat4, mat_xform); | |||||
| } | |||||
| void initResize(TransInfo *t, float mouse_dir_constraint[3]) | void initResize(TransInfo *t, float mouse_dir_constraint[3]) | ||||
| { | { | ||||
| t->mode = TFM_RESIZE; | t->mode = TFM_RESIZE; | ||||
| t->transform = applyResize; | t->transform = applyResize; | ||||
| t->transform_matrix = NULL; | t->transform_matrix = resize_transform_matrix_fn; | ||||
| t->tsnap.snap_mode_apply_fn = ApplySnapResize; | t->tsnap.snap_mode_apply_fn = ApplySnapResize; | ||||
| t->tsnap.snap_mode_distance_fn = ResizeBetween; | t->tsnap.snap_mode_distance_fn = ResizeBetween; | ||||
| if (is_zero_v3(mouse_dir_constraint)) { | if (is_zero_v3(mouse_dir_constraint)) { | ||||
| initMouseInputMode(t, &t->mouse, INPUT_SPRING_FLIP); | initMouseInputMode(t, &t->mouse, INPUT_SPRING_FLIP); | ||||
| } | } | ||||
| else { | else { | ||||
| int mval_start[2], mval_end[2]; | int mval_start[2], mval_end[2]; | ||||
| ▲ Show 20 Lines • Show All 56 Lines • Show Last 20 Lines | |||||