diff options
Diffstat (limited to 'source/blender/editors/include')
-rw-r--r-- | source/blender/editors/include/ED_anim_api.h | 14 | ||||
-rw-r--r-- | source/blender/editors/include/ED_keyframes_draw.h | 26 | ||||
-rw-r--r-- | source/blender/editors/include/UI_icons.h | 1 | ||||
-rw-r--r-- | source/blender/editors/include/UI_resources.h | 2 |
4 files changed, 27 insertions, 16 deletions
diff --git a/source/blender/editors/include/ED_anim_api.h b/source/blender/editors/include/ED_anim_api.h index eacf769270b..1095c770703 100644 --- a/source/blender/editors/include/ED_anim_api.h +++ b/source/blender/editors/include/ED_anim_api.h @@ -74,6 +74,7 @@ typedef struct bAnimContext { short mode; /* editor->mode */ short spacetype; /* sa->spacetype */ short regiontype; /* active region -> type (channels or main) */ + struct ScrArea *sa; /* editor host */ struct SpaceLink *sl; /* editor data */ struct ARegion *ar; /* region within editor */ @@ -85,6 +86,8 @@ typedef struct bAnimContext { ListBase *markers; /* active set of markers */ struct ReportList *reports; /* pointer to current reports list */ + + float yscale_fac; /* scale factor for height of channels (i.e. based on the size of keyframes) */ } bAnimContext; /* Main Data container types */ @@ -329,11 +332,11 @@ typedef enum eAnimFilter_Flags { /* -------------- Channel Defines -------------- */ /* channel heights */ -#define ACHANNEL_FIRST (-0.8f * U.widget_unit) -#define ACHANNEL_HEIGHT (0.8f * U.widget_unit) -#define ACHANNEL_HEIGHT_HALF (0.4f * U.widget_unit) -#define ACHANNEL_SKIP (0.1f * U.widget_unit) -#define ACHANNEL_STEP (ACHANNEL_HEIGHT + ACHANNEL_SKIP) +#define ACHANNEL_FIRST(ac) (-0.8f * (ac)->yscale_fac * U.widget_unit) +#define ACHANNEL_HEIGHT(ac) (0.8f * (ac)->yscale_fac * U.widget_unit) +#define ACHANNEL_HEIGHT_HALF(ac) (0.4f * (ac)->yscale_fac * U.widget_unit) +#define ACHANNEL_SKIP (0.1f * U.widget_unit) +#define ACHANNEL_STEP(ac) (ACHANNEL_HEIGHT(ac) + ACHANNEL_SKIP) /* channel widths */ #define ACHANNEL_NAMEWIDTH (10 * U.widget_unit) @@ -345,7 +348,6 @@ typedef enum eAnimFilter_Flags { /* -------------- NLA Channel Defines -------------- */ /* NLA channel heights */ -// XXX: NLACHANNEL_FIRST isn't used? #define NLACHANNEL_FIRST (-0.8f * U.widget_unit) #define NLACHANNEL_HEIGHT(snla) ((snla && (snla->flag & SNLA_NOSTRIPCURVES)) ? (0.8f * U.widget_unit) : (1.2f * U.widget_unit)) #define NLACHANNEL_HEIGHT_HALF(snla) ((snla && (snla->flag & SNLA_NOSTRIPCURVES)) ? (0.4f * U.widget_unit) : (0.6f * U.widget_unit)) diff --git a/source/blender/editors/include/ED_keyframes_draw.h b/source/blender/editors/include/ED_keyframes_draw.h index 7d163da0db0..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 */ @@ -108,23 +114,23 @@ void draw_keyframe_shape(float x, float y, float xscale, float hsize, short sel, /* Channel Drawing ------------------ */ /* F-Curve */ -void draw_fcurve_channel(struct View2D *v2d, struct AnimData *adt, struct FCurve *fcu, float ypos); +void draw_fcurve_channel(struct View2D *v2d, struct AnimData *adt, struct FCurve *fcu, float ypos, float yscale_fac); /* Action Group Summary */ -void draw_agroup_channel(struct View2D *v2d, struct AnimData *adt, struct bActionGroup *agrp, float ypos); +void draw_agroup_channel(struct View2D *v2d, struct AnimData *adt, struct bActionGroup *agrp, float ypos, float yscale_fac); /* Action Summary */ -void draw_action_channel(struct View2D *v2d, struct AnimData *adt, struct bAction *act, float ypos); +void draw_action_channel(struct View2D *v2d, struct AnimData *adt, struct bAction *act, float ypos, float yscale_fac); /* Object Summary */ -void draw_object_channel(struct View2D *v2d, struct bDopeSheet *ads, struct Object *ob, float ypos); +void draw_object_channel(struct View2D *v2d, struct bDopeSheet *ads, struct Object *ob, float ypos, float yscale_fac); /* Scene Summary */ -void draw_scene_channel(struct View2D *v2d, struct bDopeSheet *ads, struct Scene *sce, float ypos); +void draw_scene_channel(struct View2D *v2d, struct bDopeSheet *ads, struct Scene *sce, float ypos, float yscale_fac); /* DopeSheet Summary */ -void draw_summary_channel(struct View2D *v2d, struct bAnimContext *ac, float ypos); +void draw_summary_channel(struct View2D *v2d, struct bAnimContext *ac, float ypos, float yscale_fac); /* Grease Pencil datablock summary */ -void draw_gpencil_channel(struct View2D *v2d, struct bDopeSheet *ads, struct bGPdata *gpd, float ypos); +void draw_gpencil_channel(struct View2D *v2d, struct bDopeSheet *ads, struct bGPdata *gpd, float ypos, float yscale_fac); /* Grease Pencil Layer */ -void draw_gpl_channel(struct View2D *v2d, struct bDopeSheet *ads, struct bGPDlayer *gpl, float ypos); +void draw_gpl_channel(struct View2D *v2d, struct bDopeSheet *ads, struct bGPDlayer *gpl, float ypos, float yscale_fac); /* Mask Layer */ -void draw_masklay_channel(struct View2D *v2d, struct bDopeSheet *ads, struct MaskLayer *masklay, float ypos); +void draw_masklay_channel(struct View2D *v2d, struct bDopeSheet *ads, struct MaskLayer *masklay, float ypos, float yscale_fac); /* Keydata Generation --------------- */ /* F-Curve */ 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]); |