Parcourir la source

FBX: ContentTextureKey to disable cache
FBXDump remove useless import

shadowislord il y a 10 ans
Parent
commit
ba8349a0cf

+ 9 - 0
jme3-plugins/src/fbx/java/com/jme3/scene/plugins/fbx/ContentTextureKey.java

@@ -32,6 +32,8 @@
 package com.jme3.scene.plugins.fbx;
 
 import com.jme3.asset.TextureKey;
+import com.jme3.asset.cache.AssetCache;
+import com.jme3.asset.cache.WeakRefCloneAssetCache;
 import com.jme3.export.InputCapsule;
 import com.jme3.export.JmeExporter;
 import com.jme3.export.JmeImporter;
@@ -56,6 +58,13 @@ public class ContentTextureKey extends TextureKey {
 		return content;
 	}
 	
+        @Override
+        public Class<? extends AssetCache> getCacheType(){
+            // Need to override this so that textures embedded in FBX
+            // don't get cached by the asset manager.
+            return null;
+        }
+        
 	@Override
 	public String toString() {
 		return super.toString() + " " + content.length + " bytes";

+ 0 - 1
jme3-plugins/src/fbx/java/com/jme3/scene/plugins/fbx/file/FBXDump.java

@@ -37,7 +37,6 @@ import java.lang.reflect.Array;
 import java.text.DecimalFormat;
 import java.util.HashMap;
 import java.util.Map;
-import static org.omg.IOP.IORHelper.id;
 
 /**
  * Quick n' dirty dumper of FBX binary files.