From 09ef8a1fdcdb6fe7625f0432a554d0bafa147869 Mon Sep 17 00:00:00 2001 From: Don McCurdy Date: Sat, 2 Dec 2023 11:28:36 -0500 Subject: [PATCH] fix(flatten): Don't let weights animation disqualify node from flatten() (#1187) --- packages/functions/src/flatten.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/functions/src/flatten.ts b/packages/functions/src/flatten.ts index 5c33ee7e0..4b1a7e437 100644 --- a/packages/functions/src/flatten.ts +++ b/packages/functions/src/flatten.ts @@ -46,12 +46,12 @@ export function flatten(_options: FlattenOptions = FLATTEN_DEFAULTS): Transform } } - // (2) Mark animated nodes. + // (2) Mark nodes with TRS animation. const animated = new Set(); for (const animation of root.listAnimations()) { for (const channel of animation.listChannels()) { const node = channel.getTargetNode(); - if (node) { + if (node && channel.getTargetPath() !== 'weights') { animated.add(node); } }