Bugfix: fixed a bug that caused IDENTITY matrix to be changed during loading (sorry about that ;).

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10925 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
experimental
Kae..pl 11 years ago
parent 66c1b0b457
commit 9289d03604
  1. 2
      engine/src/blender/com/jme3/scene/plugins/blender/objects/ObjectHelper.java

@ -276,7 +276,7 @@ public class ObjectHelper extends AbstractBlenderHelper {
* @return objects transformation relative to its parent * @return objects transformation relative to its parent
*/ */
public Transform getTransformation(Structure objectStructure, BlenderContext blenderContext) { public Transform getTransformation(Structure objectStructure, BlenderContext blenderContext) {
Matrix4f parentInv = Matrix4f.IDENTITY; Matrix4f parentInv = Matrix4f.IDENTITY.clone();
Pointer pParent = (Pointer) objectStructure.getFieldValue("parent"); Pointer pParent = (Pointer) objectStructure.getFieldValue("parent");
if(pParent.isNotNull()) { if(pParent.isNotNull()) {
Structure parentObjectStructure = (Structure) blenderContext.getLoadedFeature(pParent.getOldMemoryAddress(), LoadedFeatureDataType.LOADED_STRUCTURE); Structure parentObjectStructure = (Structure) blenderContext.getLoadedFeature(pParent.getOldMemoryAddress(), LoadedFeatureDataType.LOADED_STRUCTURE);

Loading…
Cancel
Save