Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Leung <aligorith@gmail.com>2010-04-02 05:03:40 +0400
committerJoshua Leung <aligorith@gmail.com>2010-04-02 05:03:40 +0400
commitc6b77a06dd1baede633f18b094867603e0ef66f6 (patch)
tree8360c833c49c4b507347452ad5b5e774999b82b6 /source/blender/editors/interface/resources.c
parent248f1380af7780d2e9bc0d1a06b407897a6cfde3 (diff)
Keyframe Defaults and Cleanups:
This commit fixes reports #21638 and #21818, which were both also Durian feature requests. Cbanges: * Added new default setting for the type of handles created when creating keyframes. This can be found in the user-preferences, and is used whenever existing keyframes aren't being overwritten (instead of the value being always taken from the keyframes either side, #21638). * When keyframing over existing keyframes, only the values will be changed. The handles will be offset by the same amount that the value of the keyframe changed, though how well this works in practice still needs to be tested more thoroughly (#21818, already fixed earlier, but this commit is the full fix). * When 'free' handles are added by default, they are offset to be +/- 1 frame on either side of the keyframe so that it is obvious that they can be moved. However, they just take the same value of the keyframe since this is easiest. * Properly initialising handle colour defaults for 3D-View and Graph Editor. Graph Editor's theme userprefs also show these settings now, though the layout is really quick hack-style.
Diffstat (limited to 'source/blender/editors/interface/resources.c')
-rw-r--r--source/blender/editors/interface/resources.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c
index b885d6cd355..2296da63800 100644
--- a/source/blender/editors/interface/resources.c
+++ b/source/blender/editors/interface/resources.c
@@ -1412,6 +1412,35 @@ void init_userdef_do_versions(void)
if (U.flag & USER_LMOUSESELECT)
U.flag &= ~USER_TWOBUTTONMOUSE;
}
+ if (G.main->versionfile < 252 || (G.main->versionfile == 252 && G.main->subversionfile < 4)) {
+ bTheme *btheme;
+
+ /* default new handle type is auto handles */
+ U.keyhandles_new = HD_AUTO;
+
+ /* init new curve colors */
+ for(btheme= U.themes.first; btheme; btheme= btheme->next) {
+ /* init colors used for handles in 3D-View */
+ SETCOL(btheme->tv3d.handle_free, 0, 0, 0, 255);
+ SETCOL(btheme->tv3d.handle_auto, 0x90, 0x90, 0x00, 255);
+ SETCOL(btheme->tv3d.handle_vect, 0x40, 0x90, 0x30, 255);
+ SETCOL(btheme->tv3d.handle_align, 0x80, 0x30, 0x60, 255);
+ SETCOL(btheme->tv3d.handle_sel_free, 0, 0, 0, 255);
+ SETCOL(btheme->tv3d.handle_sel_auto, 0xf0, 0xff, 0x40, 255);
+ SETCOL(btheme->tv3d.handle_sel_vect, 0x40, 0xc0, 0x30, 255);
+ SETCOL(btheme->tv3d.handle_sel_align, 0xf0, 0x90, 0xa0, 255);
+
+ /* same colors again for Graph Editor... */
+ SETCOL(btheme->tipo.handle_free, 0, 0, 0, 255);
+ SETCOL(btheme->tipo.handle_auto, 0x90, 0x90, 0x00, 255);
+ SETCOL(btheme->tipo.handle_vect, 0x40, 0x90, 0x30, 255);
+ SETCOL(btheme->tipo.handle_align, 0x80, 0x30, 0x60, 255);
+ SETCOL(btheme->tipo.handle_sel_free, 0, 0, 0, 255);
+ SETCOL(btheme->tipo.handle_sel_auto, 0xf0, 0xff, 0x40, 255);
+ SETCOL(btheme->tipo.handle_sel_vect, 0x40, 0xc0, 0x30, 255);
+ SETCOL(btheme->tipo.handle_sel_align, 0xf0, 0x90, 0xa0, 255);
+ }
+ }
/* GL Texture Garbage Collection (variable abused above!) */