Revision: 16316
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=16316
Author:   aligorith
Date:     2008-08-31 09:33:27 +0200 (Sun, 31 Aug 2008)

Log Message:
-----------
Bugfix #17551: AutoKey for Visual Keying non-functional

No VisualKeying checks were being done

Modified Paths:
--------------
    trunk/blender/source/blender/src/transform_conversions.c

Modified: trunk/blender/source/blender/src/transform_conversions.c
===================================================================
--- trunk/blender/source/blender/src/transform_conversions.c    2008-08-31 
02:01:22 UTC (rev 16315)
+++ trunk/blender/source/blender/src/transform_conversions.c    2008-08-31 
07:33:27 UTC (rev 16316)
@@ -3751,6 +3751,35 @@
                                                insertkey_smarter(id, ID_PO, 
pchan->name, NULL, AC_SIZE_Z);
                                        }
                                }
+                               else if (IS_AUTOKEY_FLAG(AUTOMATKEY)) {
+                                       int matok=0; 
+                                       
+                                       /* check one to make sure we're not 
trying to set visual loc keys on
+                                               bones inside of a chain, which 
only leads to tears. */
+                                       matok=  insertmatrixkey(id, ID_PO, 
pchan->name, NULL, AC_LOC_X);
+                                                       insertmatrixkey(id, 
ID_PO, pchan->name, NULL, AC_LOC_Y);
+                                                       insertmatrixkey(id, 
ID_PO, pchan->name, NULL, AC_LOC_Z);
+                                       
+                                       if (matok == 0) {
+                                               insertkey(id, ID_PO, 
pchan->name, NULL, AC_LOC_X, 0);
+                                               insertkey(id, ID_PO, 
pchan->name, NULL, AC_LOC_Y, 0);
+                                               insertkey(id, ID_PO, 
pchan->name, NULL, AC_LOC_Z, 0);
+                                       }
+                                       
+                                       /* check one to make sure we're not 
trying to set visual rot keys on
+                                               bones inside of a chain, which 
only leads to tears. */
+                                       matok=  insertmatrixkey(id, ID_PO, 
pchan->name, NULL, AC_QUAT_W);
+                                                       insertmatrixkey(id, 
ID_PO, pchan->name, NULL, AC_QUAT_X);
+                                                       insertmatrixkey(id, 
ID_PO, pchan->name, NULL, AC_QUAT_Y);
+                                                       insertmatrixkey(id, 
ID_PO, pchan->name, NULL, AC_QUAT_Z);
+                                       
+                                       if (matok == 0) {
+                                               insertkey(id, ID_PO, 
pchan->name, NULL, AC_QUAT_W, 0);
+                                               insertkey(id, ID_PO, 
pchan->name, NULL, AC_QUAT_X, 0);
+                                               insertkey(id, ID_PO, 
pchan->name, NULL, AC_QUAT_Y, 0);
+                                               insertkey(id, ID_PO, 
pchan->name, NULL, AC_QUAT_Z, 0);
+                                       }
+                               }
                                /* insert keyframe in any channel that's 
appropriate */
                                else {
                                        insertkey(id, ID_PO, pchan->name, NULL, 
AC_SIZE_X, 0);


_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to