From 5224b1cab247834cdb014f73b72c7a738da9999a Mon Sep 17 00:00:00 2001 From: Charles Wardlaw Date: Fri, 5 Jul 2024 20:19:47 +0200 Subject: [PATCH] Fix #124206: USD: Always export animation transforms, even when identity Now the export only skips identity transforms on static exports, to save space. Co-authored-by: Charles Wardlaw Pull Request: https://projects.blender.org/blender/blender/pulls/124251 --- source/blender/io/usd/intern/usd_writer_transform.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/blender/io/usd/intern/usd_writer_transform.cc b/source/blender/io/usd/intern/usd_writer_transform.cc index 459aab0b4e2..bfaa71daf0e 100644 --- a/source/blender/io/usd/intern/usd_writer_transform.cc +++ b/source/blender/io/usd/intern/usd_writer_transform.cc @@ -98,8 +98,8 @@ void USDTransformWriter::do_write(HierarchyContext &context) mul_m4_m4m4(parent_relative_matrix, context.parent_matrix_inv_world, context.matrix_world); } - /* USD Xforms are by default set with an identity transform; only write if necessary. */ - if (!compare_m4m4(parent_relative_matrix, UNIT_M4, 0.000000001f)) { + /* USD Xforms are by default the identity transform; only write if necessary when static. */ + if (is_animated_ || !compare_m4m4(parent_relative_matrix, UNIT_M4, 0.000000001f)) { set_xform_ops(parent_relative_matrix, xform); }