Fix for empty nodes in blender not ranged in hierarchy

@Kaelthas Could this be added?

I used among others this file with empty parents to confirm it’s working.

[patch]Index: src/blender/com/jme3/scene/plugins/blender/objects/


— src/blender/com/jme3/scene/plugins/blender/objects/ (revision 8315)

+++ src/blender/com/jme3/scene/plugins/blender/objects/ (working copy)

@@ -152,6 +152,14 @@

LOGGER.log(Level.INFO, “Importing empty.”);

Node empty = new Node(name);



  •                //setting the parent<br />
  •   			if(parent instanceof Node) {<br />
  •   				((Node)parent).attachChild(empty);<br />
  •   			}<br />


  •                //I prefer do calculate bounding box here than read it from the file<br />
  •   			empty.updateModelBound();<br />

result = empty;




It looks fine.

Seems that I forgot to attach an empty to its parent. :wink:

@Kaelthas I’m sure you have enough work already but could you remember to add the fix above, please?

Btw. something different… when you have a incomplete mesh in your blend file by mistake, like a stand alone edge, you get following exception. Something more descriptive than a NullPointerException would be cool, that’s not so important, though.

[java]SEVERE: Uncaught exception thrown in Thread[LWJGL Renderer Thread,5,main]


at com.jme3.scene.plugins.blender.meshes.MeshHelper.toMesh(

at com.jme3.scene.plugins.blender.objects.ObjectHelper.toObject(

at com.jme3.scene.plugins.blender.AbstractBlenderLoader.toObject(

at com.jme3.scene.plugins.blender.BlenderLoader.toObject(

at com.jme3.scene.plugins.blender.BlenderModelLoader.toObject(

at com.jme3.scene.plugins.blender.BlenderModelLoader.load(

at com.jme3.scene.plugins.blender.BlenderModelLoader.load(

at com.jme3.asset.DesktopAssetManager.loadAsset(

at com.jme3.asset.DesktopAssetManager.loadModel(


at com.jme3.system.lwjgl.LwjglAbstractDisplay.initInThread(



Sorry I’ve completely forgot to add empty to its parent.

Already fixed and commited :wink:

As for the NPE here this is caused by the lack of faces.

I can add a fix but I’d rather discuss first what to do with such situation.

@normen wht do you think?

Shall I Import the mesh without faces as a point or line ?

Or shall I not import it at all and create an empty node.

In blender you can see the mesh without faces as one made of edges only.

But it cannot be seen in the rendered images.

Maybe I should add an option in the blender key about that ?

Hm, hard to say… Basically I would say if theres no faces the model is broken for a game ^^ I’d say leave them out and put out warnings… The guy who sees a use in these will probably explain it to us then if he exists :slight_smile: