|
|
|
@ -118,6 +118,7 @@ import com.jme3.util.BufferUtils; |
|
|
|
|
//read animations
|
|
|
|
|
ArrayList<Animation> animations = new ArrayList<Animation>(); |
|
|
|
|
List<FileBlockHeader> actionHeaders = blenderContext.getFileBlocks(Integer.valueOf(FileBlockHeader.BLOCK_AC00)); |
|
|
|
|
if(actionHeaders != null) {//it may happen that the model has armature with no actions
|
|
|
|
|
for (FileBlockHeader header : actionHeaders) { |
|
|
|
|
Structure actionStructure = header.getStructure(blenderContext); |
|
|
|
|
String actionName = actionStructure.getName(); |
|
|
|
@ -136,6 +137,7 @@ import com.jme3.util.BufferUtils; |
|
|
|
|
boneAnimation.setTracks(tracks); |
|
|
|
|
animations.add(boneAnimation); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
animData = new AnimData(new Skeleton(bones), animations); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|