From 132b0abc500b8b59e30b8da587e4cfb276376773 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Re=CC=81my=20Bouquet?= Date: Sat, 7 Oct 2017 10:27:03 +0200 Subject: [PATCH] glTF Properly ignore morph animation until they are supported --- .../com/jme3/scene/plugins/gltf/GltfLoader.java | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/jme3-plugins/src/gltf/java/com/jme3/scene/plugins/gltf/GltfLoader.java b/jme3-plugins/src/gltf/java/com/jme3/scene/plugins/gltf/GltfLoader.java index a1353d33f..8b2897e50 100644 --- a/jme3-plugins/src/gltf/java/com/jme3/scene/plugins/gltf/GltfLoader.java +++ b/jme3-plugins/src/gltf/java/com/jme3/scene/plugins/gltf/GltfLoader.java @@ -761,16 +761,6 @@ public class GltfLoader implements AssetLoader { times = readAccessorData(timeIndex, floatArrayPopulator); addToCache("accessors", timeIndex, times, accessors.size()); } -// if (animData.times == null) { -// animData.times = times; -// } else { -// //check if we are loading the same time array -// if (animData.times != times) { -// //TODO there might be work to do here... if the inputs are different we might want to merge the different times array... -// //easier said than done. -// logger.log(Level.WARNING, "Channel has different input accessors for samplers"); -// } -// } if (targetPath.equals("translation")) { animData.timeArrays.add(new AnimData.TimeData(times, AnimData.Type.Translation)); @@ -784,6 +774,12 @@ public class GltfLoader implements AssetLoader { animData.timeArrays.add(new AnimData.TimeData(times, AnimData.Type.Rotation)); Quaternion[] rotations = readAccessorData(dataIndex, quaternionArrayPopulator); animData.rotations = rotations; + } else { + //TODO support weights + logger.log(Level.WARNING, "Morph animation is not supported"); + animatedNodes[targetNode] = null; + continue; + } animatedNodes[targetNode] = customContentManager.readExtensionAndExtras("channel", channel, animData); }