Recent commit to GeometryBatchFactory giving UnsupportedOperationException

I just updated to nightly, and after this commit 5 days ago:

i’m getting this error, with a simple exported cube from blender (the default one!), among other models.
[java]java.lang.UnsupportedOperationException: The geometry Cube1 (Geometry) buffer Index has different number of components than the rest of the meshes (this: 1, expected: 3)[/java]

Here is the attached model (made with blender 2.62):

Simple test case to load it:
[java]package com.mmm.util.test;

import com.jme3.scene.Spatial;
import jme3tools.optimize.GeometryBatchFactory;

public class TestGeometryBatch extends SimpleApplication {

public static void main(String[] args) {
    new TestGeometryBatch().start();

public void simpleInitApp() {

    for (int i = 0; i < 3; ++i) {
        Spatial s = assetManager.loadModel("Models/cube.j3o");


1 Like

You try to combine meshes with differing buffers. E.g. one with a binormal buffer and one without, which would result in data corruption.

yeh thats what i thought, but this cube only has 1 mesh, so they should all have the same amount of buffers.

I exported it as a .obj and ogre and converted those to .j3o and they loaded fine. Seems it’s only when converting the .blend file directly to .j3o and trying to batch them that the issue arises

So the blend importer causes that. How does the model look in the SceneExplorer with everything unfolded?

looks like this:

I also removed the inner node to see if there was any other magic happening there, but still failed

hm… @Momoko_Fan?

@wezrule: Thanks, it should be fixed now.

1 Like

How do I install the patch? I did “Help => Check for Updates” and “Tools => Plugins => Check for Updates” but came up empty.

@seann999 said: How do I install the patch? I did "Help => Check for Updates" and "Tools => Plugins => Check for Updates" but came up empty.
Nightly is called nightly cause its built nightly :roll:

@normen Ok, so I guess I’ll wait for night… That’s what you mean, right?

0h EST

@Momoko_Fan said: @wezrule: Thanks, it should be fixed now.

looks like it worked, thanks!