Transform And Mesh Cloning Child Names

Yo @Deltakosh … I have a problem where the child nodes of deep cloning ALWAYS prefixes the new parent clone name with the child name: TransformNode.clone and Mesh.Constructor

if ((<any>child).clone) {
    (<any>child).clone(name + "." + child.name, result);
}

This is renaming my whole hierarchy and really messing things up when cloning with children.
Can we please add some sort of switch or something on the scene (scene.prefixClonedChildNames - default true)

if (scene.prefixClonedChildNames === true) {
  if ((<any>child).clone) {
    (<any>child).clone(name + "." + child.name, result);
  }
}
else
{
  if ((<any>child).clone) {
    (<any>child).clone(child.name, result);
  }
}

That way i can turn that off and have the same name as my clone source children by setting scene.prefixClonedChildNames = false;

Please let me know if something like that is kool and i will make a PR :slight_smile: