소스 검색

Bugfix: include all bones in the chain of the IK constraint if the
specified chain length is zero.

jmekaelthas 10 년 전
부모
커밋
2d9a1b8737
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      jme3-blender/src/main/java/com/jme3/scene/plugins/blender/constraints/definitions/ConstraintDefinitionIK.java

+ 1 - 1
jme3-blender/src/main/java/com/jme3/scene/plugins/blender/constraints/definitions/ConstraintDefinitionIK.java

@@ -182,7 +182,7 @@ public class ConstraintDefinitionIK extends ConstraintDefinition {
                 if (!useTail) {
                     bone = bone.getParent();
                 }
-                while (bone != null && this.size() < bonesAffected) {
+                while (bone != null && (bonesAffected <= 0 || this.size() < bonesAffected)) {
                     BoneContext boneContext = blenderContext.getBoneContext(bone);
                     this.add(boneContext);
                     alteredOmas.add(boneContext.getBoneOma());