NLA SoC: Bugfix for Auto-Keyframing version patching
authorJoshua Leung <aligorith@gmail.com>
Thu, 2 Jul 2009 03:50:20 +0000 (03:50 +0000)
committerJoshua Leung <aligorith@gmail.com>
Thu, 2 Jul 2009 03:50:20 +0000 (03:50 +0000)
When auto-keying is enabled, the insertion mode is no-longer blank. The version patching code now takes this into account, but the conversion doesn't work for existing .b25.blend defaults files though.

source/blender/blenloader/intern/readfile.c

index 0c1ba32c54372dd2d141b739a69129382beef86e..beebf58b6c00164c0d6f8a0323c1230a90b8803c 100644 (file)
@@ -9220,7 +9220,14 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
                        if(ts->normalsize == 0.0) {
                                ts->normalsize= 0.1f;
                                ts->selectmode= SCE_SELECT_VERTEX;
+                               
+                               /* autokeying - setting should be taken from the user-prefs
+                                * but the userprefs version may not have correct flags set 
+                                * (i.e. will result in blank box when enabled)
+                                */
                                ts->autokey_mode= U.autokey_mode;
+                               if (ts->autokey_mode == 0) 
+                                       ts->autokey_mode= 2; /* 'add/replace' but not on */
                        }
                }
        }