Browse Source

* Add small work around in MTL loader: Do not accept "d 0" or "Tr 0" as they hide the model

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9723 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
Sha..rd 13 years ago
parent
commit
e848c53ef4
1 changed files with 5 additions and 2 deletions
  1. 5 2
      engine/src/core-plugins/com/jme3/scene/plugins/MTLLoader.java

+ 5 - 2
engine/src/core-plugins/com/jme3/scene/plugins/MTLLoader.java

@@ -219,8 +219,11 @@ public class MTLLoader implements AssetLoader {
             }
             
         }else if (cmd.equals("d") || cmd.equals("tr")){
-            alpha = scan.nextFloat();
-            transparent = true;
+            float tempAlpha = scan.nextFloat();
+            if (tempAlpha != 0){
+                alpha = tempAlpha;
+                transparent = true;
+            }
         }else if (cmd.equals("map_ka")){
             // ignore it for now
             return skipLine();