Transform: Initialize 'transform_matrix' accordingly

Some transform modes are changeable, so callbacks should be reset
together.

Currently the unchanged `transform_matrix` callback is not a major
issue as it is only used for gizmos and gizmos stop updating when
changing the operator type.
This commit is contained in:
Germano Cavalcante 2023-01-24 16:44:31 -03:00
parent 5cc9f07d5c
commit 0f52aa0954
3 changed files with 3 additions and 0 deletions

View File

@ -1498,6 +1498,7 @@ void initEdgeSlide_ex(
t->mode = TFM_EDGE_SLIDE;
t->transform = applyEdgeSlide;
t->handleEvent = handleEventEdgeSlide;
t->transform_matrix = NULL;
t->tsnap.snap_mode_apply_fn = edge_slide_snap_apply;
t->tsnap.snap_mode_distance_fn = transform_snap_distance_len_squared_fn;

View File

@ -285,6 +285,7 @@ void initResize(TransInfo *t, float mouse_dir_constraint[3])
{
t->mode = TFM_RESIZE;
t->transform = applyResize;
t->transform_matrix = NULL;
t->tsnap.snap_mode_apply_fn = ApplySnapResize;
t->tsnap.snap_mode_distance_fn = ResizeBetween;

View File

@ -610,6 +610,7 @@ void initVertSlide_ex(TransInfo *t, bool use_even, bool flipped, bool use_clamp)
t->mode = TFM_VERT_SLIDE;
t->transform = applyVertSlide;
t->handleEvent = handleEventVertSlide;
t->transform_matrix = NULL;
t->tsnap.snap_mode_apply_fn = vert_slide_snap_apply;
t->tsnap.snap_mode_distance_fn = transform_snap_distance_len_squared_fn;