Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Antalik <richardantalik@gmail.com>2021-10-16 00:02:08 +0300
committerRichard Antalik <richardantalik@gmail.com>2021-10-16 00:20:45 +0300
commite11b33fec33392640e74b9f180572fc0a504287e (patch)
treefc5528eeac6e5239b6f48e01ec7db2ba07665db0 /source/blender/editors/transform
parent81514b0e913b03ab7fb6aa779d23a1d651ad82b7 (diff)
Remove math for 2D affine transform
Commit e1665c3d3190 added math to do 2D affine transformations with 3x3 matrices, but these matrices are also used for 3D transformations. Remove added functions and use 4x4 matrices for 2D transformation. Reviewed By: campbellbarton Differential Revision: https://developer.blender.org/D12510
Diffstat (limited to 'source/blender/editors/transform')
-rw-r--r--source/blender/editors/transform/transform_convert_sequencer_image.c3
-rw-r--r--source/blender/editors/transform/transform_gizmo_2d.c3
-rw-r--r--source/blender/editors/transform/transform_orientations.c3
3 files changed, 3 insertions, 6 deletions
diff --git a/source/blender/editors/transform/transform_convert_sequencer_image.c b/source/blender/editors/transform/transform_convert_sequencer_image.c
index 2b5ed268504..c0dbd5404a4 100644
--- a/source/blender/editors/transform/transform_convert_sequencer_image.c
+++ b/source/blender/editors/transform/transform_convert_sequencer_image.c
@@ -87,9 +87,8 @@ static TransData *SeqToTransData(const Scene *scene,
unit_m3(td->mtx);
unit_m3(td->smtx);
- unit_m3(td->axismtx);
- rotate_m3(td->axismtx, transform->rotation);
+ axis_angle_to_mat3_single(td->axismtx, 'Z', transform->rotation);
normalize_m3(td->axismtx);
tdseq->seq = seq;
diff --git a/source/blender/editors/transform/transform_gizmo_2d.c b/source/blender/editors/transform/transform_gizmo_2d.c
index 7ba52ec823d..84f7900e31c 100644
--- a/source/blender/editors/transform/transform_gizmo_2d.c
+++ b/source/blender/editors/transform/transform_gizmo_2d.c
@@ -652,7 +652,6 @@ static void gizmo2d_xform_invoke_prepare(const bContext *C,
float c[3] = {mid[0], mid[1], 0.0f};
float orient_matrix[3][3];
- unit_m3(orient_matrix);
ScrArea *area = CTX_wm_area(C);
@@ -673,7 +672,7 @@ static void gizmo2d_xform_invoke_prepare(const bContext *C,
rotate_around_center_v2(c, origin, ggd->rotation);
- rotate_m3(orient_matrix, ggd->rotation);
+ axis_angle_to_mat3_single(orient_matrix, 'Z', ggd->rotation);
}
int orient_type = gizmo2d_calc_transform_orientation(C);
diff --git a/source/blender/editors/transform/transform_orientations.c b/source/blender/editors/transform/transform_orientations.c
index 298cd00bb46..a1ed66c96a3 100644
--- a/source/blender/editors/transform/transform_orientations.c
+++ b/source/blender/editors/transform/transform_orientations.c
@@ -609,8 +609,7 @@ short transform_orientation_matrix_get(bContext *C,
Scene *scene = t->scene;
Sequence *seq = SEQ_select_active_get(scene);
if (seq && seq->strip->transform && orient_index == V3D_ORIENT_LOCAL) {
- unit_m3(r_spacemtx);
- rotate_m3(r_spacemtx, seq->strip->transform->rotation);
+ axis_angle_to_mat3_single(r_spacemtx, 'Z', seq->strip->transform->rotation);
return orient_index;
}
}