Pārlūkot izejas kodu

Added else for if-else condition

Kacey Coley 7 gadi atpakaļ
vecāks
revīzija
ae293fa4e3
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  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);
                                 this.materials.push(material);
                                 materialIndex = this.materials.length - 1;
                                 materialIndex = this.materials.length - 1;
                             }
                             }
-                            if (babylonMaterial instanceof MultiMaterial) {
+                            else if (babylonMaterial instanceof MultiMaterial) {
                                 babylonMaterial = babylonMaterial.subMaterials[submesh.materialIndex];
                                 babylonMaterial = babylonMaterial.subMaterials[submesh.materialIndex];
                                 if (babylonMaterial) {
                                 if (babylonMaterial) {
                                     materialIndex = this.babylonScene.materials.indexOf(babylonMaterial);
                                     materialIndex = this.babylonScene.materials.indexOf(babylonMaterial);