diff options
author | Joshua Leung <aligorith@gmail.com> | 2016-07-07 14:37:15 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2016-07-07 16:49:25 +0300 |
commit | f3b3eb70a6c0576db88115e5b9742295809ca6fd (patch) | |
tree | 7c828d8bc86da96eb2d9b21613118de979509380 /source/blender/editors/include | |
parent | 2ba2860e11c122824bb4e083b3f1148610693be3 (diff) |
Dopesheet: Added "Moving Hold" as a keyframe type
Currently "long keyframes" are only useful for indicating where stationary
holds occur. If however you try to create a "moving hold" (where the values
are slightly different, but in terms of overall effect, it's still a hold)
then it could get tricky to keep track of where these occur.
Now it's possible to tag such keyframes (using the keyframe types - RKEY)
as being part of a moving hold. These will not only be drawn differently
from normal keyframes, but they will also result in a "long keyframe"
being drawn between each pair of them, just like if they had been completely
stationary instead.
Currently the theming/styling of these is a bit rough. They reuse the existing
theme colours for long keyframes.
Diffstat (limited to 'source/blender/editors/include')
-rw-r--r-- | source/blender/editors/include/ED_keyframes_draw.h | 8 | ||||
-rw-r--r-- | source/blender/editors/include/UI_icons.h | 1 | ||||
-rw-r--r-- | source/blender/editors/include/UI_resources.h | 2 |
3 files changed, 10 insertions, 1 deletions
diff --git a/source/blender/editors/include/ED_keyframes_draw.h b/source/blender/editors/include/ED_keyframes_draw.h index 43264a6edaa..b1f3f012e09 100644 --- a/source/blender/editors/include/ED_keyframes_draw.h +++ b/source/blender/editors/include/ED_keyframes_draw.h @@ -80,7 +80,7 @@ typedef struct ActKeyBlock { /* key-block info */ char sel; - short handle_type; + short flag; float val; float start, end; @@ -89,6 +89,12 @@ typedef struct ActKeyBlock { short totcurve; } ActKeyBlock; +/* ActKeyBlock - Flag */ +typedef enum eActKeyBlock_Flag { + /* Key block represents a moving hold */ + ACTKEYBLOCK_FLAG_MOVING_HOLD = (1 << 0), +} eActKeyBlock_Flag; + /* *********************** Keyframe Drawing ****************************** */ /* options for keyframe shape drawing */ diff --git a/source/blender/editors/include/UI_icons.h b/source/blender/editors/include/UI_icons.h index 2c80701bf69..d85b60dcc43 100644 --- a/source/blender/editors/include/UI_icons.h +++ b/source/blender/editors/include/UI_icons.h @@ -1020,6 +1020,7 @@ DEF_VICO(KEYTYPE_KEYFRAME_VEC) DEF_VICO(KEYTYPE_BREAKDOWN_VEC) DEF_VICO(KEYTYPE_EXTREME_VEC) DEF_VICO(KEYTYPE_JITTER_VEC) +DEF_VICO(KEYTYPE_MOVING_HOLD_VEC) DEF_VICO(COLORSET_01_VEC) DEF_VICO(COLORSET_02_VEC) diff --git a/source/blender/editors/include/UI_resources.h b/source/blender/editors/include/UI_resources.h index dc843952229..a81221ed54b 100644 --- a/source/blender/editors/include/UI_resources.h +++ b/source/blender/editors/include/UI_resources.h @@ -347,6 +347,8 @@ void UI_GetThemeColorShade3ubv(int colorid, int offset, unsigned char col[3]) // get four color values, scaled to 0.0-1.0 range void UI_GetThemeColor4fv(int colorid, float col[4]); +// get four color values, range 0.0-1.0, complete with shading offset for the RGB components +void UI_GetThemeColorShade4fv(int colorid, int offset, float col[4]); // get the 3 or 4 byte values void UI_GetThemeColor3ubv(int colorid, unsigned char col[3]); |