some more rig options, fix typo

This commit is contained in:
Campbell Barton
2009-12-09 14:29:55 +00:00
parent a41131db24
commit 5dd68e8cb6
3 changed files with 17 additions and 2 deletions

View File

@@ -126,7 +126,12 @@ def ik(obj, definitions, base_names):
mt.update()
ik.update()
ik_chain.update()
# Set IK dof
ik_chain.forearm_p.ik_dof_x = True
ik_chain.forearm_p.ik_dof_y = False
ik_chain.forearm_p.ik_dof_z = False
con = ik_chain.forearm_p.constraints.new('IK')
con.target = obj
con.subtarget = ik_chain.hand
@@ -191,6 +196,11 @@ def fk(obj, definitions, base_names):
ex.update()
fk_chain.update()
# Set rotation modes and axis locks
fk_chain.forearm_p.rotation_mode = 'XYZ'
fk_chain.forearm_p.lock_rotation = (False, True, True)
fk_chain.hand_p.rotation_mode = 'ZXY'
con = fk_chain.arm_p.constraints.new('COPY_LOCATION')
con.target = obj
con.subtarget = ex.socket

View File

@@ -213,6 +213,11 @@ def ik(obj, bone_definition, base_names):
mt_chain.update()
ik_chain.update()
# Set IK dof
ik_chain.shin_p.ik_dof_x = True
ik_chain.shin_p.ik_dof_y = False
ik_chain.shin_p.ik_dof_z = False
# IK
con = ik_chain.shin_p.constraints.new('IK')
con.chain_length = 2

View File

@@ -43,7 +43,7 @@
#include "BKE_context.h"
#include "BKE_depsgraph.h"
#include "BKE_idprop.h"
#include "BKE_main.h""
#include "BKE_main.h"
#include "ED_armature.h"
#include "BKE_armature.h"