瀏覽代碼

Bugfix: fixed a bug that caused NPE to be raised when object had armature but bones were not attached to vertices (now every skeleton that is defined in the blender file is loaded).

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10852 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
Kae..pl 12 年之前
父節點
當前提交
e148d0e01a
共有 1 個文件被更改,包括 1 次插入5 次删除
  1. 1 5
      engine/src/blender/com/jme3/scene/plugins/blender/modifiers/ArmatureModifier.java

+ 1 - 5
engine/src/blender/com/jme3/scene/plugins/blender/modifiers/ArmatureModifier.java

@@ -70,11 +70,7 @@ import com.jme3.util.BufferUtils;
      */
     public ArmatureModifier(Structure objectStructure, Structure modifierStructure, BlenderContext blenderContext) throws BlenderFileException {
         Structure meshStructure = ((Pointer) objectStructure.getFieldValue("data")).fetchData(blenderContext.getInputStream()).get(0);
-        Pointer pDvert = (Pointer) meshStructure.getFieldValue("dvert");// dvert = DeformVERTices
-
-        // if pDvert==null then there are not vertex groups and no need to load
-        // skeleton (untill bone envelopes are supported)
-        if (this.validate(modifierStructure, blenderContext) && pDvert.isNotNull()) {
+        if (this.validate(modifierStructure, blenderContext)) {
             Pointer pArmatureObject = (Pointer) modifierStructure.getFieldValue("object");
             if (pArmatureObject.isNotNull()) {
                 ArmatureHelper armatureHelper = blenderContext.getHelper(ArmatureHelper.class);