diff options
author | Joshua Leung <aligorith@gmail.com> | 2011-08-04 18:13:05 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2011-08-04 18:13:05 +0400 |
commit | 900928f8bf47b8f1bbb1b2cd863d2d9649c940a0 (patch) | |
tree | e5d20746f2a35a5dca94dba00d1d0dc1ff83eeec /source/blender/editors/interface | |
parent | 2ed11158db7cfc157c26475a2dcb5f513043cd72 (diff) |
Bassam Feature Request: "Auto Clamped" handles can now be set per
handle/key
This used to be a weird per-curve setting which would happen to get
applied/work correctly if handles were set to "auto", and was a source
of constant confusion for both old and new animators. The main effect
of this handle-type/option was really to just ensure that auto-handles
stayed horizontal, instead of tilting as the keys were moved.
This commit simply changes this from a per-curve to per
keyframe/handle setting.
Diffstat (limited to 'source/blender/editors/interface')
-rw-r--r-- | source/blender/editors/interface/resources.c | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c index dd63cdf5861..00c92b85ee7 100644 --- a/source/blender/editors/interface/resources.c +++ b/source/blender/editors/interface/resources.c @@ -328,6 +328,8 @@ const unsigned char *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colo cp= ts->handle_free; break; case TH_HANDLE_AUTO: cp= ts->handle_auto; break; + case TH_HANDLE_AUTOCLAMP: + cp= ts->handle_auto_clamped; break; case TH_HANDLE_VECT: cp= ts->handle_vect; break; case TH_HANDLE_ALIGN: @@ -336,11 +338,13 @@ const unsigned char *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colo cp= ts->handle_sel_free; break; case TH_HANDLE_SEL_AUTO: cp= ts->handle_sel_auto; break; + case TH_HANDLE_SEL_AUTOCLAMP: + cp= ts->handle_sel_auto_clamped; break; case TH_HANDLE_SEL_VECT: cp= ts->handle_sel_vect; break; case TH_HANDLE_SEL_ALIGN: cp= ts->handle_sel_align; break; - + case TH_SYNTAX_B: cp= ts->syntaxb; break; case TH_SYNTAX_V: @@ -667,6 +671,8 @@ void ui_theme_init_default(void) SETCOL(btheme->tipo.handle_vertex, 0, 0, 0, 255); SETCOL(btheme->tipo.handle_vertex_select, 255, 133, 0, 255); + SETCOL(btheme->tipo.handle_auto_clamped, 0x99, 0x40, 0x30, 255); + SETCOL(btheme->tipo.handle_sel_auto_clamped, 0xf0, 0xaf, 0x90, 255); btheme->tipo.handle_vertex_size= 4; SETCOL(btheme->tipo.ds_channel, 82, 96, 110, 255); @@ -1557,6 +1563,21 @@ void init_userdef_do_versions(void) U.autokey_flag &= ~AUTOKEY_FLAG_ONLYKEYINGSET; } + if (bmain->versionfile < 258 || (bmain->versionfile == 258 && bmain->subversionfile < 1)) { + bTheme *btheme; + + /* if new keyframes handle default is stuff "auto", make it "auto-clamped" instead */ + if (U.keyhandles_new == HD_AUTO) + U.keyhandles_new = HD_AUTO_ANIM; + + /* theme color additions */ + for (btheme= U.themes.first; btheme; btheme= btheme->next) { + /* auto-clamped handles -> based on auto */ + SETCOL(btheme->tipo.handle_auto_clamped, 0x99, 0x40, 0x30, 255); + SETCOL(btheme->tipo.handle_sel_auto_clamped, 0xf0, 0xaf, 0x90, 255); + } + } + /* GL Texture Garbage Collection (variable abused above!) */ if (U.textimeout == 0) { U.texcollectrate = 60; |