From eee5a880f186fe9e49bd41a9dc7d6d0bdd371c36 Mon Sep 17 00:00:00 2001 From: Alexander Gavrilov Date: Sun, 14 Apr 2019 16:34:06 +0300 Subject: 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 --- source/blender/blenloader/intern/versioning_280.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'source/blender/blenloader') diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c index 952c3646e2e..ce2345b44db 100644 --- a/source/blender/blenloader/intern/versioning_280.c +++ b/source/blender/blenloader/intern/versioning_280.c @@ -3096,6 +3096,22 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) } } + if (!MAIN_VERSION_ATLEAST(bmain, 280, 57)) { + /* Enable Show Interpolation in dopesheet by default. */ + for (bScreen *screen = bmain->screens.first; screen; screen = screen->id.next) { + for (ScrArea *sa = screen->areabase.first; sa; sa = sa->next) { + for (SpaceLink *sl = sa->spacedata.first; sl; sl = sl->next) { + if (sl->spacetype == SPACE_ACTION) { + SpaceAction *saction = (SpaceAction *)sl; + if ((saction->flag & SACTION_SHOW_EXTREMES) == 0) { + saction->flag |= SACTION_SHOW_INTERPOLATION; + } + } + } + } + } + } + { /* Versioning code until next subversion bump goes here. */ } -- cgit v1.2.3