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:
authorSybren A. Stüvel <sybren@stuvel.eu>2017-05-26 15:02:50 +0300
committerSybren A. Stüvel <sybren@stuvel.eu>2017-05-30 14:47:51 +0300
commit4e5440686d16fa0e1a51a71faae0d84e36d4a5f0 (patch)
tree0803f342aa7fc20cde96d3c0523db301b8f2778f
parent916eca6a1e52806cf135f2c289432820547f1502 (diff)
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.
-rw-r--r--source/blender/alembic/intern/abc_transform.cc1
1 files changed, 1 insertions, 0 deletions
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);