|
|
@@ -414,6 +414,7 @@ public class BatchNode extends Node implements Savable {
|
|
|
int totalVerts = 0;
|
|
|
int totalTris = 0;
|
|
|
int totalLodLevels = 0;
|
|
|
+ int maxWeights = -1;
|
|
|
|
|
|
Mesh.Mode mode = null;
|
|
|
for (Geometry geom : geometries) {
|
|
|
@@ -450,6 +451,8 @@ public class BatchNode extends Node implements Savable {
|
|
|
compsForBuf[vb.getBufferType().ordinal()] = vb.getNumComponents();
|
|
|
formatForBuf[vb.getBufferType().ordinal()] = vb.getFormat();
|
|
|
}
|
|
|
+
|
|
|
+ maxWeights = Math.max(maxWeights, geom.getMesh().getMaxNumWeights());
|
|
|
|
|
|
if (mode != null && mode != listMode) {
|
|
|
throw new UnsupportedOperationException("Cannot combine different"
|
|
|
@@ -459,6 +462,7 @@ public class BatchNode extends Node implements Savable {
|
|
|
compsForBuf[VertexBuffer.Type.Index.ordinal()] = components;
|
|
|
}
|
|
|
|
|
|
+ outMesh.setMaxNumWeights(maxWeights);
|
|
|
outMesh.setMode(mode);
|
|
|
if (totalVerts >= 65536) {
|
|
|
// make sure we create an UnsignedInt buffer so
|