Fix T65717: Alembic (camera - also mesh) import scale issue

The w-component of the translation column of the scaled matrix wasn't
set to 1.0, which, apart from being incorrect, caused drawing problems.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5290
This commit is contained in:
Sybren A. Stüvel 2019-07-18 15:39:50 +02:00
parent 406e960327
commit 0dece50667
Notes: blender-bot 2023-02-14 08:10:10 +01:00
Referenced by issue #65717, Alembic (camera - also mesh) import scale issue
1 changed files with 1 additions and 2 deletions

View File

@ -343,8 +343,7 @@ void AbcObjectReader::read_matrix(float r_mat[4][4],
/* Only apply scaling to root objects, parenting will propagate it. */
float scale_mat[4][4];
scale_m4_fl(scale_mat, scale);
scale_mat[3][3] = scale; /* scale translations too */
mul_m4_m4m4(r_mat, r_mat, scale_mat);
mul_m4_m4m4(r_mat, scale_mat, r_mat);
}
is_constant = schema.isConstant();