In my case, I am doing it via a script and Wes Library.
I am using JmeConvert for my asset-importing pipeline which lets me run custom scripts on the models when converting to j3o.
Just in case, here is an example groovy script I am using for splitting and simplifying animations on my animals model pack. Hope you find it helpful
package scripts
import com.dalwiestudio.jmeutils.util.AnimUtils
import com.jme3.anim.AnimClip
import com.jme3.anim.AnimComposer
import com.jme3.anim.AnimTrack
import com.jme3.anim.TransformTrack
import com.jme3.math.FastMath
import jme3utilities.MyAnimation
import jme3utilities.wes.AnimationEdit
import jme3utilities.wes.TrackEdit
import jme3utilities.wes.TweenTransforms
/**
*
* @author Ali-RS
*/
// The following bindings are setup by default:
// convert - the JME Convert instance
// model - the loaded ModelInfo. model.modelRoot is the loaded spatial.
println "Applying ChibiPetsAnim script"
/*
Key Frames:
0 - 5 T-pose
10 - 180 idle_01
180 - 280 idle_02
280 - 380 idle_03
390 - 490 sitting
500 - 600 sleeping
610 - 625 hit
625 - 660 attack
660 - 700 death
710 - 830 wash
830 - 900 eat
900 - 980 happy
980 - 1060 glum
1060 - 1130 voice
1130 - 1190 licking
1190 - 1240 shaking
1240 - 1300 digging
1310 - 1350 walk
1355 - 1395 walk_back
1400 - 1440 walk_left
1440 - 1480 walk_right
1485 - 1505 run
1510 - 1540 jump
1545 - 1585 swim
1590 - 1630 jumpy
*/
AnimComposer composer = AnimUtils.findAnimRoot(model.modelRoot).getControl(AnimComposer.class);
AnimClip animPack = composer.getAnimClip("anim-pack");
TweenTransforms techniques = new TweenTransforms();
extract("T-pose", 0, 5,composer, animPack, techniques);
extract("idle_01", 10, 180, composer, animPack, techniques);
extract("idle_02", 180, 280,composer, animPack, techniques);
extract("idle_03", 280, 380,composer, animPack, techniques);
extract("sitting", 390, 490,composer, animPack, techniques);
extract("sleeping", 500, 600,composer, animPack, techniques);
extract("hit", 610, 625,composer, animPack, techniques);
extract("attack", 625, 660,composer, animPack, techniques);
extract("death", 660, 700,composer, animPack, techniques);
extract("wash", 710, 830,composer, animPack, techniques);
extract("eat", 830, 900,composer, animPack, techniques);
extract("happy", 900, 980,composer, animPack, techniques);
extract("glum", 980, 1060,composer, animPack, techniques);
extract("voice", 1060, 1130,composer, animPack, techniques);
extract("licking", 1130, 1190,composer, animPack, techniques);
extract("shaking", 1190, 1240,composer, animPack, techniques);
extract("digging", 1240, 1300,composer, animPack, techniques);
extract("walk", 1310, 1350,composer, animPack, techniques);
extract("walk_back", 1355, 1395,composer, animPack, techniques);
extract("walk_left", 1400, 1440,composer, animPack, techniques);
extract("walk_right", 1440, 1480,composer, animPack, techniques);
extract("run", 1485, 1505,composer, animPack, techniques);
extract("jump", 1510, 1540,composer, animPack, techniques);
extract("swim", 1545, 1585,composer, animPack, techniques);
extract("jumpy", 1590, 1630,composer, animPack, techniques);
composer.removeAnimClip(animPack);
void extract(String clipName, int startFrame, int endFrame, AnimComposer composer, AnimClip animPack, TweenTransforms techniques) {
float[] times = MyAnimation.getKeyFrameTimes(animPack.getTracks()[0]);
float startTime = times[startFrame];
float endTime = times[endFrame];
AnimClip extractedClip = AnimationEdit.extractAnimation(animPack, startTime, endTime, techniques, clipName);
AnimTrack[] oldTracks = extractedClip.getTracks()
AnimTrack[] newTracks = new AnimTrack[oldTracks.length]; // Simplified
for (int i = 0; i < oldTracks.length; i++) {
AnimTrack track = oldTracks[i];
if (track instanceof TransformTrack) {
TransformTrack simplified = TrackEdit.simplify(track, FastMath.ZERO_TOLERANCE);
simplified = TrackEdit.resampleToNumber(simplified, (int) (simplified.getTimes().length * 0.5f), (float) extractedClip.getLength());
newTracks[i] = simplified;
} else {
// Do not simplify
newTracks[i] = track;
}
}
// Set simplified tracks
extractedClip.setTracks(newTracks);
composer.addAnimClip(extractedClip);
}