[Bf-blender-cvs] [4e5440686d1] master: Alembic export: normalise the homogeneous component after scaling
Sybren A. Stüvel
noreply at git.blender.org
Tue May 30 13:48:20 CEST 2017
Commit: 4e5440686d16fa0e1a51a71faae0d84e36d4a5f0
Author: Sybren A. Stüvel
Date: Fri May 26 14:02:50 2017 +0200
Branches: master
https://developer.blender.org/rB4e5440686d16fa0e1a51a71faae0d84e36d4a5f0
Alembic export: normalise the homogeneous component after scaling
The scale matrix must have its homogeneous 'w' (at mat[3][3]) set to the
scale in order to also scale the translations along with it. However, this
also scales the transform matrix's 'w' component, which is not supposed
to happen.
===================================================================
M source/blender/alembic/intern/abc_transform.cc
===================================================================
diff --git a/source/blender/alembic/intern/abc_transform.cc b/source/blender/alembic/intern/abc_transform.cc
index e2369e80618..5392387663f 100644
--- a/source/blender/alembic/intern/abc_transform.cc
+++ b/source/blender/alembic/intern/abc_transform.cc
@@ -108,6 +108,7 @@ void AbcTransformWriter::do_write()
scale_m4_fl(scale_mat, m_settings.global_scale);
scale_mat[3][3] = m_settings.global_scale; /* also scale translation */
mul_m4_m4m4(yup_mat, yup_mat, scale_mat);
+ yup_mat[3][3] /= m_settings.global_scale; /* normalise the homogeneous component */
}
m_matrix = convert_matrix(yup_mat);
More information about the Bf-blender-cvs
mailing list