Fixed Issue 498: Blender loader has strict requirements for animation import.

(Although the animation of the given model looks bad because bone constraints are not yet fully supported.)

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9577 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
Kae..pl 13 years ago
parent 3a5b8bb3d6
commit 86be16cda4
  1. 5
      engine/src/blender/com/jme3/scene/plugins/blender/animations/Ipo.java
  2. 5
      engine/src/blender/com/jme3/scene/plugins/blender/animations/IpoHelper.java

@ -1,5 +1,7 @@
package com.jme3.scene.plugins.blender.animations;
import java.util.logging.Logger;
import com.jme3.animation.BoneTrack;
import com.jme3.animation.SpatialTrack;
import com.jme3.animation.Track;
@ -16,6 +18,7 @@ import com.jme3.scene.plugins.blender.curves.BezierCurve;
* @author Marcin Roguski
*/
public class Ipo {
private static final Logger LOGGER = Logger.getLogger(Ipo.class.getName());
public static final int AC_LOC_X = 1;
public static final int AC_LOC_Y = 2;
@ -218,7 +221,7 @@ public class Ipo {
}
break;
default:
throw new IllegalStateException("Unknown ipo curve type: " + bezierCurves[j].getType());
LOGGER.warning("Unknown ipo curve type: " + bezierCurves[j].getType());
}
}
translations[index] = new Vector3f(translation[0], translation[1], translation[2]);

@ -10,6 +10,7 @@ import com.jme3.scene.plugins.blender.file.FileBlockHeader;
import com.jme3.scene.plugins.blender.file.Pointer;
import com.jme3.scene.plugins.blender.file.Structure;
import java.util.List;
import java.util.logging.Logger;
/**
* This class helps to compute values from interpolation curves for features
@ -19,6 +20,7 @@ import java.util.List;
* @author Marcin Roguski
*/
public class IpoHelper extends AbstractBlenderHelper {
private static final Logger LOGGER = Logger.getLogger(IpoHelper.class.getName());
/**
* This constructor parses the given blender version and stores the result.
@ -132,7 +134,8 @@ public class IpoHelper extends AbstractBlenderHelper {
if (rnaPath.endsWith("rotation") || rnaPath.endsWith("rotation_euler")) {
return Ipo.OB_ROT_X + arrayIndex;
}
throw new IllegalStateException("Unknown curve rna path: " + rnaPath);
LOGGER.warning("Unknown curve rna path: " + rnaPath);
return -1;
}
/**

Loading…
Cancel
Save