Blender object animation importer length bug [patch]

The Blender object animation importer is truncating the animation duration to an integer. This fixes it:



[patch]Index: src/blender/com/jme3/scene/plugins/blender/modifiers/ObjectAnimationModifier.java

===================================================================

— src/blender/com/jme3/scene/plugins/blender/modifiers/ObjectAnimationModifier.java (revision 9625)

+++ src/blender/com/jme3/scene/plugins/blender/modifiers/ObjectAnimationModifier.java (working copy)

@@ -50,7 +50,7 @@

// calculating track

SpatialTrack track = (SpatialTrack) ipo.calculateTrack(-1, 0, ipo.getLastFrame(), fps, true);


  •   Animation animation = new Animation(objectAnimationName, ipo.getLastFrame() / fps);<br />
    
  •   Animation animation = new Animation(objectAnimationName, ipo.getLastFrame() / (float)fps);<br />
    

animation.setTracks(new SpatialTrack[] { track });

ArrayList<Animation> animations = new ArrayList<Animation>(1);

animations.add(animation);

[/patch]

3 Likes

@rectalogic thanks for finding this out :slight_smile:

@nehon said:
Kirill committed this patch 2 days ago

Wups, got it. Almost completely caught up now after 5 days in the mountains ^^

Dunno if @Kaelthas is subscribed to this forum, so, nudge :stuck_out_tongue:

Kirill committed this patch 2 days ago http://code.google.com/p/jmonkeyengine/source/detail?r=9626

thanks @rectalogic