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 <cwardlaw@nvidia.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/124251
This commit is contained in:
Charles Wardlaw 2024-07-05 20:19:47 +02:00 committed by Jesse Yurkovich
parent 938f50e1f7
commit 5224b1cab2

@ -98,8 +98,8 @@ void USDTransformWriter::do_write(HierarchyContext &context)
mul_m4_m4m4(parent_relative_matrix, context.parent_matrix_inv_world, context.matrix_world); 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. */ /* USD Xforms are by default the identity transform; only write if necessary when static. */
if (!compare_m4m4(parent_relative_matrix, UNIT_M4, 0.000000001f)) { if (is_animated_ || !compare_m4m4(parent_relative_matrix, UNIT_M4, 0.000000001f)) {
set_xform_ops(parent_relative_matrix, xform); set_xform_ops(parent_relative_matrix, xform);
} }