Fix #91966: Alembic/USD export ignores bone parent animation

For non-object parents (so bones & vertices), the parent is now also
explicitly checked for animation. In other words: having an animated
parent will cause the transform of the child to be written to Alembic/USD
on every frame (as if it is animated itself).
This commit is contained in:
Sybren A. Stüvel
2023-04-17 16:21:33 +02:00
parent b75b734969
commit c041a36286

View File

@@ -485,6 +485,12 @@ void AbstractHierarchyIterator::context_update_for_graph_index(
{
/* Update the HierarchyContext so that it is consistent with the graph index. */
context->export_parent = graph_index.object;
/* If the parent type is such that it cannot be exported (at least not currently to USD or
* Alembic), always check the parent for animation. */
const short partype = context->object->partype & PARTYPE;
context->animation_check_include_parent |= ELEM(partype, PARBONE, PARVERT1, PARVERT3, PARSKEL);
if (context->export_parent != context->object->parent) {
/* The parent object in Blender is NOT used as the export parent. This means
* that the world transform of this object can be influenced by objects that