+ self.__addBone(bone)
+ self.__getBone(bone, b)
+
+ pose = armatureObj.getPose()
+ for b in pose.bones.values():
+ for c in b.constraints:
+ if c.type==Blender.Constraint.Type.IKSOLVER:
+ # IK effector
+ e=b
+ for i in range(c[Blender.Constraint.Settings.CHAINLEN]):
+ # IK影響下
+ self.__boneByName(e.name).type=4
+ e=e.parent
+ # IK target
+ assert(c[Blender.Constraint.Settings.TARGET]==armatureObj)
+ self.__boneByName(
+ c[Blender.Constraint.Settings.BONE]).type=2
+
+ def __boneByName(self, name):
+ return self.bones[self.boneMap[name]]
+
+ def __getBone(self, parent, b):
+ if not Blender.Armature.CONNECTED in b.options:
+ #print b, b.options
+ pass