TransformNode clone doesn't contain original tags

Hello folks,

it seems like the TransformNode.clone function doesn’t clone the tags of the original mesh.
Can be reproduced with this PG example.

It works for meshes though.

The two methods are a bit different in the way they are implemented, but you are right - the tags are not being cloned in any node type apart from mesh.

The missing code is roughly this:

if (Tags && Tags.HasTags(source)) {
  Tags.AddTagsTo(clone, Tags.GetTags(source, true));

You can do it manually until we see when we address it


Thx for the fast response.
The suggested code works as expected :+1:

1 Like

A fix is coming soon:
fix tag assignment when copying by RaananW · Pull Request #13555 · BabylonJS/Babylon.js (