Blender Loader: NPE in ArmatureModifier

If I try to view this model:

http://e2-productions.com/repository/modules/PDdownloads/singlefile.php?cid=1&lid=273



I get this exception:

[java]

java.lang.NullPointerException

at com.jme3.scene.plugins.blender.modifiers.ArmatureModifier.<init>(ArmatureModifier.java:121)

at com.jme3.scene.plugins.blender.modifiers.ModifierHelper.readModifiers(ModifierHelper.java:86)

at com.jme3.scene.plugins.blender.objects.ObjectHelper.toObject(ObjectHelper.java:176)

at com.jme3.scene.plugins.blender.AbstractBlenderLoader.toObject(AbstractBlenderLoader.java:135)

at com.jme3.scene.plugins.blender.BlenderLoader.toObject(BlenderLoader.java:71)

at com.jme3.scene.plugins.blender.BlenderModelLoader.load(BlenderModelLoader.java:64)

at com.jme3.scene.plugins.blender.BlenderModelLoader.load(BlenderModelLoader.java:50)

at com.jme3.asset.DesktopAssetManager.loadAsset(DesktopAssetManager.java:243)

at com.jme3.asset.DesktopAssetManager.loadModel(DesktopAssetManager.java:376)

[catch] at com.jme3.gde.core.assets.SpatialAssetDataObject.loadAsset(SpatialAssetDataObject.java:86)

at com.jme3.gde.core.assets.actions.OpenModel$1.run(OpenModel.java:72)

at java.lang.Thread.run(Thread.java:662)

[/java]



At some point previously this model would load (without hair) but that was probably before the animation loading stuff was added.

@Kaelthas?

OK fixed that :slight_smile:



The problem occured when the armature had no actions applied. Should work fine now.

1 Like

Thanks! I’ll test it here when it gets into the next nightly.



Did you happen to notice if she imported with hair or not? Before, that model always imported bald for some reason.

The hair was fine :slight_smile:

Hair and skin and everything. Very nice. Thanks.



Any idea when she will get her skeleton back? getControl(SkeletonControl.class) returns null. Just wondering if that’s a bug or just an unimplemented feature. I think I heard it’s just not implemented yet.

I didn’t check the skeleton.

Skeleton loading and animations are implemented so it should be there.

Its probably a bug :wink:

Ok, as per the other thread, I just double checked the whole loaded hierarchy for any controls and found none. So for some reason, that model is loaded without a skeleton control.



Just in case, here were my steps:

  1. right click the female.blend in JMP and select “Convert to j3o binary”
  2. have my code load the .j3o file… model = assetManager.loadModel(“pathtomy.j3o”)
  3. traverse the spatial hierarchy and dump all of the controls to see what they had.



    For my old ogre converted model I get a SkeletonControl and an AnimationControl… but not for the blender plugin converted one.



    Thanks for any help. Really looking forward to having hair and a reliable blender import path.

It’s already possible to import a bone setup with or without animations? I can’t see the animcontrol/skeletoncontrol nodes in SceneExplorer :/.