浏览代码

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);