From 1b99896be42152da32cc564463bbe4d64dc1aa57 Mon Sep 17 00:00:00 2001 From: jmekaelthas Date: Mon, 8 Feb 2016 13:29:02 +0100 Subject: [PATCH] Bugfix: fixed a bug that caused ClassCastException while loading linked meshes. --- .../jme3/scene/plugins/blender/BlenderContext.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/jme3-blender/src/main/java/com/jme3/scene/plugins/blender/BlenderContext.java b/jme3-blender/src/main/java/com/jme3/scene/plugins/blender/BlenderContext.java index 58114cf28..c96807ed0 100644 --- a/jme3-blender/src/main/java/com/jme3/scene/plugins/blender/BlenderContext.java +++ b/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.Structure; import com.jme3.scene.plugins.blender.materials.MaterialContext; +import com.jme3.scene.plugins.blender.meshes.TemporalMesh; import com.jme3.texture.Texture; /** @@ -389,11 +390,11 @@ public class BlenderContext { } } } else if("ME".equals(namePrefix)) { - List features = (List) linkedFeatures.get("meshes"); - if(features != null) { - for(Node feature : features) { - if(featureName.equals(feature.getName())) { - return feature; + List temporalMeshes = (List) linkedFeatures.get("meshes"); + if(temporalMeshes != null) { + for(TemporalMesh temporalMesh : temporalMeshes) { + if(featureName.equals(temporalMesh.getName())) { + return temporalMesh; } } }