From 733195c33caba3b6a2b4e113c33e8d7de789665e Mon Sep 17 00:00:00 2001 From: "Kae..pl" Date: Fri, 29 Jul 2011 08:43:23 +0000 Subject: [PATCH] Fix with reading the proper buffer. git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7943 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- .../scene/plugins/blender/helpers/v249/ModifierHelper.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/engine/src/blender/com/jme3/scene/plugins/blender/helpers/v249/ModifierHelper.java b/engine/src/blender/com/jme3/scene/plugins/blender/helpers/v249/ModifierHelper.java index 22b971232..ca07e349a 100644 --- a/engine/src/blender/com/jme3/scene/plugins/blender/helpers/v249/ModifierHelper.java +++ b/engine/src/blender/com/jme3/scene/plugins/blender/helpers/v249/ModifierHelper.java @@ -32,7 +32,7 @@ package com.jme3.scene.plugins.blender.helpers.v249; import java.nio.FloatBuffer; -import java.nio.ShortBuffer; +import java.nio.IntBuffer; import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; @@ -678,7 +678,7 @@ public class ModifierHelper extends AbstractBlenderHelper { FloatBuffer cloneBindPosePosition = clone.getFloatBuffer(Type.BindPosePosition); FloatBuffer cloneNormals = clone.getFloatBuffer(Type.Normal); FloatBuffer cloneBindPoseNormals = clone.getFloatBuffer(Type.BindPoseNormal); - ShortBuffer cloneIndexes = (ShortBuffer) clone.getBuffer(Type.Index).getData(); + IntBuffer cloneIndexes = (IntBuffer) clone.getBuffer(Type.Index).getData(); // modyfying data for (int i = mirrorIndex; i < clonePosition.limit(); i += 3) { @@ -700,7 +700,7 @@ public class ModifierHelper extends AbstractBlenderHelper { //modifying clone indexes int vertexIndex = (i - mirrorIndex) / 3; if (vertexIndex % 3 == 0) { - short index = cloneIndexes.get(vertexIndex + 2); + int index = cloneIndexes.get(vertexIndex + 2); cloneIndexes.put(vertexIndex + 2, cloneIndexes.get(vertexIndex + 1)); cloneIndexes.put(vertexIndex + 1, index); }