Bläddra i källkod

Merge pull request #3510 from MackeyK24/master

Master
David Catuhe 7 år sedan
förälder
incheckning
c761efe791
1 ändrade filer med 9 tillägg och 4 borttagningar
  1. 9 4
      src/Mesh/babylon.mesh.ts

+ 9 - 4
src/Mesh/babylon.mesh.ts

@@ -186,15 +186,20 @@
                 }
 
                 // Deep copy
-                Tools.DeepCopy(source, this, ["name", "material", "skeleton", "instances", "parent", "uniqueId", "source"], ["_poseMatrix", "_source"]);
-
+                Tools.DeepCopy(source, this, ["name", "material", "skeleton", "instances", "parent", "uniqueId", "source", "metadata"], ["_poseMatrix", "_source"]);
+
+                // Metadata
+                if (source.metadata.clone) {
+                    this.metadata = source.metadata.clone();
+                 } else {
+                    this.metadata = source.metadata;
+                 }                
+                
                 // Tags
                 if (Tags && Tags.HasTags(source)) {
                     Tags.AddTagsTo(this, Tags.GetTags(source, true));
                 }
 
-                this.metadata = source.metadata;
-
                 // Parent
                 this.parent = source.parent;