Преглед изворни кода

Added else for if-else condition

Kacey Coley пре 7 година
родитељ
комит
ae293fa4e3
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      serializers/src/glTF/2.0/babylon.glTFExporter.ts

+ 1 - 1
serializers/src/glTF/2.0/babylon.glTFExporter.ts

@@ -967,7 +967,7 @@ module BABYLON.GLTF2 {
                                 this.materials.push(material);
                                 materialIndex = this.materials.length - 1;
                             }
-                            if (babylonMaterial instanceof MultiMaterial) {
+                            else if (babylonMaterial instanceof MultiMaterial) {
                                 babylonMaterial = babylonMaterial.subMaterials[submesh.materialIndex];
                                 if (babylonMaterial) {
                                     materialIndex = this.babylonScene.materials.indexOf(babylonMaterial);