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:
authorAlexander Gavrilov <angavrilov@gmail.com>2019-04-14 16:34:06 +0300
committerAlexander Gavrilov <angavrilov@gmail.com>2019-04-14 16:34:06 +0300
commiteee5a880f186fe9e49bd41a9dc7d6d0bdd371c36 (patch)
tree477928aa8f5c0dd9749fc8a1d400b11583034f7f /source/blender/editors/space_action
parent00b966b83ac6277e2b33e976458279e954e52f45 (diff)
Dopesheet: enable Show Keyframes and Interpolation by default.
Make the option enabled by default, and enable it in old files, unless Show Extremes is enabled. However, suppress it for the Timeline, because its View menu doesn't include the option. Reviewers: billreynish, brecht Differential Revision: https://developer.blender.org/D4678
Diffstat (limited to 'source/blender/editors/space_action')
-rw-r--r--source/blender/editors/space_action/action_draw.c22
-rw-r--r--source/blender/editors/space_action/space_action.c1
2 files changed, 15 insertions, 8 deletions
diff --git a/source/blender/editors/space_action/action_draw.c b/source/blender/editors/space_action/action_draw.c
index 8cfb77e58d7..5cda7285b02 100644
--- a/source/blender/editors/space_action/action_draw.c
+++ b/source/blender/editors/space_action/action_draw.c
@@ -348,6 +348,12 @@ void draw_channel_strips(bAnimContext *ac, SpaceAction *saction, ARegion *ar)
*/
y = (float)(-ACHANNEL_HEIGHT(ac));
+ int action_flag = saction->flag;
+
+ if (saction->mode == SACTCONT_TIMELINE) {
+ action_flag &= ~(SACTION_SHOW_INTERPOLATION | SACTION_SHOW_EXTREMES);
+ }
+
for (ale = anim_data.first; ale; ale = ale->next) {
const float yminc = (float)(y - ACHANNEL_HEIGHT_HALF(ac));
const float ymaxc = (float)(y + ACHANNEL_HEIGHT_HALF(ac));
@@ -363,28 +369,28 @@ void draw_channel_strips(bAnimContext *ac, SpaceAction *saction, ARegion *ar)
/* draw 'keyframes' for each specific datatype */
switch (ale->datatype) {
case ALE_ALL:
- draw_summary_channel(v2d, ale->data, y, ac->yscale_fac, saction->flag);
+ draw_summary_channel(v2d, ale->data, y, ac->yscale_fac, action_flag);
break;
case ALE_SCE:
- draw_scene_channel(v2d, ads, ale->key_data, y, ac->yscale_fac, saction->flag);
+ draw_scene_channel(v2d, ads, ale->key_data, y, ac->yscale_fac, action_flag);
break;
case ALE_OB:
- draw_object_channel(v2d, ads, ale->key_data, y, ac->yscale_fac, saction->flag);
+ draw_object_channel(v2d, ads, ale->key_data, y, ac->yscale_fac, action_flag);
break;
case ALE_ACT:
- draw_action_channel(v2d, adt, ale->key_data, y, ac->yscale_fac, saction->flag);
+ draw_action_channel(v2d, adt, ale->key_data, y, ac->yscale_fac, action_flag);
break;
case ALE_GROUP:
- draw_agroup_channel(v2d, adt, ale->data, y, ac->yscale_fac, saction->flag);
+ draw_agroup_channel(v2d, adt, ale->data, y, ac->yscale_fac, action_flag);
break;
case ALE_FCURVE:
- draw_fcurve_channel(v2d, adt, ale->key_data, y, ac->yscale_fac, saction->flag);
+ draw_fcurve_channel(v2d, adt, ale->key_data, y, ac->yscale_fac, action_flag);
break;
case ALE_GPFRAME:
- draw_gpl_channel(v2d, ads, ale->data, y, ac->yscale_fac, saction->flag);
+ draw_gpl_channel(v2d, ads, ale->data, y, ac->yscale_fac, action_flag);
break;
case ALE_MASKLAY:
- draw_masklay_channel(v2d, ads, ale->data, y, ac->yscale_fac, saction->flag);
+ draw_masklay_channel(v2d, ads, ale->data, y, ac->yscale_fac, action_flag);
break;
}
}
diff --git a/source/blender/editors/space_action/space_action.c b/source/blender/editors/space_action/space_action.c
index 3dffa6afb55..f2550550bc1 100644
--- a/source/blender/editors/space_action/space_action.c
+++ b/source/blender/editors/space_action/space_action.c
@@ -95,6 +95,7 @@ static SpaceLink *action_new(const ScrArea *sa, const Scene *scene)
saction->autosnap = SACTSNAP_FRAME;
saction->mode = SACTCONT_DOPESHEET;
saction->mode_prev = SACTCONT_DOPESHEET;
+ saction->flag = SACTION_SHOW_INTERPOLATION;
saction->ads.filterflag |= ADS_FILTER_SUMMARY;