Bugfix: fixed a bug that caused ClassCastException while loading linked

meshes.
experimental
jmekaelthas 9 years ago
parent c7dc73e85f
commit 1b99896be4
  1. 11
      jme3-blender/src/main/java/com/jme3/scene/plugins/blender/BlenderContext.java

@ -59,6 +59,7 @@ import com.jme3.scene.plugins.blender.file.FileBlockHeader;
import com.jme3.scene.plugins.blender.file.FileBlockHeader.BlockCode; import com.jme3.scene.plugins.blender.file.FileBlockHeader.BlockCode;
import com.jme3.scene.plugins.blender.file.Structure; import com.jme3.scene.plugins.blender.file.Structure;
import com.jme3.scene.plugins.blender.materials.MaterialContext; import com.jme3.scene.plugins.blender.materials.MaterialContext;
import com.jme3.scene.plugins.blender.meshes.TemporalMesh;
import com.jme3.texture.Texture; import com.jme3.texture.Texture;
/** /**
@ -389,11 +390,11 @@ public class BlenderContext {
} }
} }
} else if("ME".equals(namePrefix)) { } else if("ME".equals(namePrefix)) {
List<Node> features = (List<Node>) linkedFeatures.get("meshes"); List<TemporalMesh> temporalMeshes = (List<TemporalMesh>) linkedFeatures.get("meshes");
if(features != null) { if(temporalMeshes != null) {
for(Node feature : features) { for(TemporalMesh temporalMesh : temporalMeshes) {
if(featureName.equals(feature.getName())) { if(featureName.equals(temporalMesh.getName())) {
return feature; return temporalMesh;
} }
} }
} }

Loading…
Cancel
Save