Conditional join() based on node name #1571
-
Hello everyone, I would like to use the join() transform to reduce the draw calls but i'm animating some parts of the model that are joined, I would like to know if there is a way to conditionally join() the meshes based on the node name so I can excluse the one I want to animate thanks in advance |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi! At present I think the way to do this would be to remove the names from any meshes you consider 'candidates' for merging (keeping names on those you want to animate) and then run join with the 'keepNamed' option enabled. Full options at: https://gltf-transform.dev/modules/functions/interfaces/JoinOptions Alternatively you can join exactly the primitives you want, with https://gltf-transform.dev/modules/functions/functions/joinPrimitives |
Beta Was this translation helpful? Give feedback.
Hi! At present I think the way to do this would be to remove the names from any meshes you consider 'candidates' for merging (keeping names on those you want to animate) and then run join with the 'keepNamed' option enabled. Full options at:
https://gltf-transform.dev/modules/functions/interfaces/JoinOptions
Alternatively you can join exactly the primitives you want, with
joinPrimitives
:https://gltf-transform.dev/modules/functions/functions/joinPrimitives