2.5 - Action Editor stuff
authorJoshua Leung <aligorith@gmail.com>
Tue, 30 Dec 2008 10:10:44 +0000 (10:10 +0000)
committerJoshua Leung <aligorith@gmail.com>
Tue, 30 Dec 2008 10:10:44 +0000 (10:10 +0000)
* Added old theme-set version patch for new Dopesheet channel colours
* Removed warnings in action_edit_keyframes.c. I need an example of how to add error reports for the code that this concerned.

source/blender/editors/space_action/action_edit_keyframes.c
source/blender/windowmanager/intern/wm_files.c

index 700be22b265b93d7119cf4b7aaaa9d74e149c67d..d9f333b4ddbd8ef9ac058aebe38d85088dc6a15b 100644 (file)
@@ -364,9 +364,9 @@ static int actkeys_copy_exec(bContext *C, wmOperator *op)
                // FIXME...
        }
        else {
-               if (copy_action_keys(&ac)) {
+               if (copy_action_keys(&ac)) {    
+                       // XXX errors - need a way to inform the user 
                        printf("Action Copy: No keyframes copied to copy-paste buffer\n");
-                       uiPupmenuError(C, "No keyframes copied to copy-paste buffer");
                }
        }
        
@@ -408,8 +408,8 @@ static int actkeys_paste_exec(bContext *C, wmOperator *op)
        }
        else {
                if (paste_action_keys(&ac)) {
+                       // XXX errors - need a way to inform the user 
                        printf("Action Paste: Nothing to paste, as Copy-Paste buffer was empty.\n");
-                       uiPupmenuError(C, "Nothing to paste, as Copy-Paste buffer was empty.");
                }
        }
        
index 02c457512464b239887a95ada71cc35e669de5db..4c16a8572511bf17da57ce0a7d0a2cc7f39f6495 100644 (file)
@@ -49,6 +49,7 @@
 #include "BLI_blenlib.h"
 #include "BLI_linklist.h"
 
+#include "DNA_ipo_types.h"
 #include "DNA_object_types.h"
 #include "DNA_space_types.h"
 #include "DNA_userdef_types.h"
@@ -321,6 +322,23 @@ static void init_userdef_themes(void)
                        SETCOL(btheme->ttime.cframe, 0x60, 0xc0, 0x40, 255);
                }
        }
+       if ((G.main->versionfile < 248) || (G.main->versionfile == 248 && G.main->subversionfile < 3)) {
+               bTheme *btheme;
+               
+               /* adjust themes */
+               for (btheme= U.themes.first; btheme; btheme= btheme->next) {
+                       /* DopeSheet - (Object) Channel color */
+                       SETCOL(btheme->tact.ds_channel, 0x36, 0x13, 0xca, 255);
+                       SETCOL(btheme->tact.ds_subchannel, 0x60, 0x43, 0xd2, 255);
+               }
+               
+               /* adjust grease-pencil distances */
+               U.gp_manhattendist= 1;
+               U.gp_euclideandist= 2;
+               
+               /* adjust default interpolation for new IPO-curves */
+               U.ipo_new= IPO_BEZ;
+       }
        
        /* GL Texture Garbage Collection (variable abused above!) */
        if (U.textimeout == 0) {