[SOLVED] Question about new Animation System - LoopMode, AnimEventListener, retarget animations

How do you specify bones to channels in old system?

Here is an example code in new system. Modify masks how ever you want and add/remove the joints to mask as needed.

AnimComposer ac = model.getControl(AnimComposer.class);
SkinningControl skin = model.getControl(SkinningControl.class);

Armature armature = skin.getArmature();

ArmatureMask legsMask = ArmatureMask.createMask(armature, "thigh.L"); // replace with proper bone name from the model
legsMask.addFromJoint(armature, "thigh.R"); // replace with proper bone name from the model
ac.makeLayer("Legs", legsMask);

ac.setCurrentAction("RunTop"); // plays on default layer that includes whole armature.
ac.setCurrentAction("RunBase", "Legs"); // plays only on legs. It will overide the default layer
3 Likes