[Bf-extensions-cvs] [5a7b984] master: Fix for referencing invalid data

Alexander Gavrilov noreply at git.blender.org
Mon Feb 22 14:56:16 CET 2016


Commit: 5a7b98485e28554d740d6d06437fbe0d7b557cc3
Author: Alexander Gavrilov
Date:   Tue Feb 23 00:41:15 2016 +1100
Branches: master
https://developer.blender.org/rBA5a7b98485e28554d740d6d06437fbe0d7b557cc3

Fix for referencing invalid data

Mode switching made this data invalid

===================================================================

M	rigify/rigs/pitchipoy/super_face.py

===================================================================

diff --git a/rigify/rigs/pitchipoy/super_face.py b/rigify/rigs/pitchipoy/super_face.py
index 2156ea7..9ed711c 100644
--- a/rigify/rigs/pitchipoy/super_face.py
+++ b/rigify/rigs/pitchipoy/super_face.py
@@ -119,7 +119,8 @@ class Rig:
         
         distance = ( eyeL_e.head - eyeR_e.head ) * 3
         distance = distance.cross( (0, 0, 1) )
-        
+        eye_length = eyeL_e.length
+
         eyeL_ctrl_name = strip_org( bones['eyes'][0] )
         eyeR_ctrl_name = strip_org( bones['eyes'][1] )
         
@@ -136,8 +137,8 @@ class Rig:
         eyes_ctrl_e.head[:] =  ( eyeL_ctrl_e.head + eyeR_ctrl_e.head ) / 2
         
         for bone in [ eyeL_ctrl_e, eyeR_ctrl_e, eyes_ctrl_e ]:
-            bone.tail[:] = bone.head + Vector( [ 0, 0, eyeL_e.length * 0.75 ] )
-        
+            bone.tail[:] = bone.head + Vector( [ 0, 0, eye_length * 0.75 ] )
+
         ## Widget for transforming the both eyes
         eye_master_names = []
         for bone in bones['eyes']:



More information about the Bf-extensions-cvs mailing list