some more rig options, fix typo
authorCampbell Barton <ideasman42@gmail.com>
Wed, 9 Dec 2009 14:29:55 +0000 (14:29 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 9 Dec 2009 14:29:55 +0000 (14:29 +0000)
release/scripts/modules/rigify/arm.py
release/scripts/modules/rigify/leg.py
source/blender/makesrna/intern/rna_armature.c

index 66797ddc31251eca68926799e22a25a22479f9a9..6ed564ac07018c2c4400cd11c8f9d4f41632d1ea 100644 (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
index 55f8fb9cf746bd32f538921d83f724c55c620584..ed28c21fd3236a59054b97d8756dcfd0d0c53693 100644 (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
index 6a6c370977a6e713e850030d059e7b57de8cb4e5..4859f23967faad25e96567c169d7145333180376 100644 (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"