ssebi / jmonkeyengine

Automatically exported from code.google.com/p/jmonkeyengine
0 stars 0 forks source link

NullPointerException when loading blender model #540

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Load the attached model

What is the expected output? What do you see instead?
The following exception is thrown:
java.lang.NullPointerException
    at com.jme3.scene.plugins.blender.modifiers.ObjectAnimationModifier.<init>(ObjectAnimationModifier.java:51)
    at com.jme3.scene.plugins.blender.modifiers.ModifierHelper.readAnimationModifier249(ModifierHelper.java:143)
    at com.jme3.scene.plugins.blender.modifiers.ModifierHelper.readModifiers(ModifierHelper.java:108)
    at com.jme3.scene.plugins.blender.objects.ObjectHelper.toObject(ObjectHelper.java:163)
    at com.jme3.scene.plugins.blender.AbstractBlenderLoader.toObject(AbstractBlenderLoader.java:137)
    at com.jme3.scene.plugins.blender.BlenderLoader.toObject(BlenderLoader.java:71)
    at com.jme3.scene.plugins.blender.BlenderModelLoader.load(BlenderModelLoader.java:66)
    at com.jme3.scene.plugins.blender.BlenderModelLoader.load(BlenderModelLoader.java:52)
    at com.jme3.asset.DesktopAssetManager.loadAsset(DesktopAssetManager.java:283)
    at com.jme3.asset.DesktopAssetManager.loadModel(DesktopAssetManager.java:369)
    at com.jme3.asset.DesktopAssetManager.loadModel(DesktopAssetManager.java:373)

NOTE: Since this issue can be fixed by reexporting the model with latest 
blender, the priority is LOW.

Original issue reported on code.google.com by ShadowIs...@gmail.com on 14 Sep 2012 at 4:23

Attachments:

GoogleCodeExporter commented 9 years ago
Here's another model with a similar issue. Also it is a 2.49 model (reexporting 
it with latest blender works).

The exception thrown is as follows:
java.lang.NullPointerException
    at com.jme3.scene.plugins.blender.animations.ArmatureHelper.getTracks249(ArmatureHelper.java:237)
    at com.jme3.scene.plugins.blender.animations.ArmatureHelper.getTracks(ArmatureHelper.java:162)
    at com.jme3.scene.plugins.blender.modifiers.ArmatureModifier.<init>(ArmatureModifier.java:131)
    at com.jme3.scene.plugins.blender.modifiers.ModifierHelper.readModifiers(ModifierHelper.java:91)
    at com.jme3.scene.plugins.blender.objects.ObjectHelper.toObject(ObjectHelper.java:163)
    at com.jme3.scene.plugins.blender.AbstractBlenderLoader.toObject(AbstractBlenderLoader.java:137)
    at com.jme3.scene.plugins.blender.BlenderLoader.toObject(BlenderLoader.java:71)
    at com.jme3.scene.plugins.blender.BlenderModelLoader.load(BlenderModelLoader.java:66)
    at com.jme3.scene.plugins.blender.BlenderModelLoader.load(BlenderModelLoader.java:52)
    at com.jme3.asset.DesktopAssetManager.loadAsset(DesktopAssetManager.java:283)
    at com.jme3.asset.DesktopAssetManager.loadModel(DesktopAssetManager.java:369)
    at com.jme3.asset.DesktopAssetManager.loadModel(DesktopAssetManager.java:373)

Original comment by ShadowIs...@gmail.com on 14 Sep 2012 at 4:38

Attachments:

GoogleCodeExporter commented 9 years ago
Another model, also 2.49.
java.lang.NullPointerException
    at com.jme3.scene.plugins.blender.objects.ObjectHelper.toObject(ObjectHelper.java:119)
    at com.jme3.scene.plugins.blender.AbstractBlenderLoader.toObject(AbstractBlenderLoader.java:137)
    at com.jme3.scene.plugins.blender.BlenderLoader.toObject(BlenderLoader.java:71)
    at com.jme3.scene.plugins.blender.BlenderModelLoader.load(BlenderModelLoader.java:66)
    at com.jme3.scene.plugins.blender.BlenderModelLoader.load(BlenderModelLoader.java:52)
    at com.jme3.asset.DesktopAssetManager.loadAsset(DesktopAssetManager.java:283)
    at com.jme3.asset.DesktopAssetManager.loadModel(DesktopAssetManager.java:369)
    at com.jme3.asset.DesktopAssetManager.loadModel(DesktopAssetManager.java:373)

Original comment by ShadowIs...@gmail.com on 14 Sep 2012 at 5:14

Attachments:

GoogleCodeExporter commented 9 years ago
I have fixed two places where NullPointer was raised. This happened so because 
some ipos didn't have curves applied.

As for the file tt-model it is not 2.49 but 2.41 (open blender file in text 
editor and see the header) and this is not supported by the importer. The 
lowest version is 2.49.

There is still issue with the model Sink Engine though. Part of the vertices is 
strongly displaced. The same happens with female3 model mentioned in another 
issue.
I know why this happens but didn't find a solution yet.
The workaround is NOT to use several materials to one mesh when armature is 
applied.
I'll focus on this one now in hope to fix that soon.

Original comment by mrogu...@poczta.fm on 16 Nov 2012 at 12:54