Closed GoogleCodeExporter closed 8 years ago
Thanks. Generally its advised to load models in the internal j3o format on all
platforms to avoid unnecessary conversion processes and problems.
Original comment by normen667
on 20 Jun 2011 at 9:19
[deleted comment]
I found that the bones array is empty prior to creating a skeleton object which results in a null pointer exception.
this can be fixed by creating one in startElement method:
### Eclipse Workspace Patch 1.0
#P jme3
Index: src/ogre/com/jme3/scene/plugins/ogre/SkeletonLoader.java
===================================================================
--- src/ogre/com/jme3/scene/plugins/ogre/SkeletonLoader.java (revision 7654)
+++ src/ogre/com/jme3/scene/plugins/ogre/SkeletonLoader.java (working copy)
@@ -128,6 +128,15 @@
animation = new BoneAnimation(name, length);
} else if (qName.equals("bonehierarchy")) {
assert elementStack.peek().equals("skeleton");
+ Bone[] bones = new Bone[indexToBone.size()];
+ // find bones without a parent and attach them to the skeleton
+ // also assign the bones to the bonelist
+ for (Map.Entry<Integer, Bone> entry : indexToBone.entrySet()) {
+ Bone bone = entry.getValue();
+ bones[entry.getKey()] = bone;
+ }
+ indexToBone.clear();
+ skeleton = new Skeleton(bones);
} else if (qName.equals("animations")) {
assert elementStack.peek().equals("skeleton");
animations = new ArrayList<BoneAnimation>();
Original comment by koby.her...@gmail.com
on 21 Jun 2011 at 8:46
Ignore my patch and use the one from kabuki instead see
http://jmonkeyengine.org/groups/android/forum/topic/how-to-run-your-jme3-applica
tion-on-android-androidharness/?topic_page=3&num=15&_wpnonce=2e68ae55e4
Original comment by ZingoAnd...@gmail.com
on 26 Jun 2011 at 2:52
"Generally its advised to load models in the internal j3o format on all
platforms to avoid unnecessary conversion processes and problems."
Thanks for the hit, Ill keep that in mind, currently Im in a tutorial mode. I
see that the startup is seems realy slow with the original formats so I assume
it will be faster with j3o.
Original comment by ZingoAnd...@gmail.com
on 26 Jun 2011 at 2:55
The issue has been fixed afaik
Original comment by normen667
on 26 Aug 2011 at 10:12
Original issue reported on code.google.com by
ZingoAnd...@gmail.com
on 20 Jun 2011 at 8:11Attachments: