diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-05-08 19:08:35 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-05-08 19:19:26 +0300 |
commit | c358da6b21158792bc05fa17fa00440675d0e76e (patch) | |
tree | 8274fafe56d0693f1cf2d38f51bbbb81b92fc149 /source/blender/blenloader/intern/versioning_defaults.c | |
parent | 275218b2053f37d34f1e07d0af0d1bd809bdb42a (diff) |
Defaults: change default settings in a few editors
* Timeline has summary collapsed to show only one row of keyframes.
* Cavity default is screen space curvature (faster).
* Scripting workspace text editor uses syntax highlight and line numbers.
* Marker lines enabled by default in all animation editors.
* Movie clip editor pivot point default to median.
Ref T63986.
Diffstat (limited to 'source/blender/blenloader/intern/versioning_defaults.c')
-rw-r--r-- | source/blender/blenloader/intern/versioning_defaults.c | 40 |
1 files changed, 34 insertions, 6 deletions
diff --git a/source/blender/blenloader/intern/versioning_defaults.c b/source/blender/blenloader/intern/versioning_defaults.c index 1da9d692440..2d6f0015634 100644 --- a/source/blender/blenloader/intern/versioning_defaults.c +++ b/source/blender/blenloader/intern/versioning_defaults.c @@ -281,17 +281,45 @@ void BLO_update_defaults_startup_blend(Main *bmain, const char *app_template) } for (bScreen *screen = bmain->screens.first; screen; screen = screen->id.next) { - /* Hide channels in timelines. */ for (ScrArea *sa = screen->areabase.first; sa; sa = sa->next) { - SpaceAction *saction = (sa->spacetype == SPACE_ACTION) ? sa->spacedata.first : NULL; + if (sa->spacetype == SPACE_ACTION) { + /* Show marker lines, hide channels and collapse summary in timelines. */ + SpaceAction *saction = sa->spacedata.first; + saction->flag |= SACTION_SHOW_MARKER_LINES; - if (saction && saction->mode == SACTCONT_TIMELINE) { - for (ARegion *ar = sa->regionbase.first; ar; ar = ar->next) { - if (ar->regiontype == RGN_TYPE_CHANNELS) { - ar->flag |= RGN_FLAG_HIDDEN; + if (saction->mode == SACTCONT_TIMELINE) { + saction->ads.flag |= ADS_FLAG_SUMMARY_COLLAPSED; + + for (ARegion *ar = sa->regionbase.first; ar; ar = ar->next) { + if (ar->regiontype == RGN_TYPE_CHANNELS) { + ar->flag |= RGN_FLAG_HIDDEN; + } } } } + else if (sa->spacetype == SPACE_GRAPH) { + SpaceGraph *sipo = sa->spacedata.first; + sipo->flag |= SIPO_MARKER_LINES; + } + else if (sa->spacetype == SPACE_NLA) { + SpaceNla *snla = sa->spacedata.first; + snla->flag |= SNLA_SHOW_MARKER_LINES; + } + else if (sa->spacetype == SPACE_TEXT) { + /* Show syntax and line numbers in Script workspace text editor. */ + SpaceText *stext = sa->spacedata.first; + stext->showsyntax = true; + stext->showlinenrs = true; + } + else if (sa->spacetype == SPACE_VIEW3D) { + /* Screen space cavity by default for faster performance. */ + View3D *v3d = sa->spacedata.first; + v3d->shading.cavity_type = V3D_SHADING_CAVITY_CURVATURE; + } + else if (sa->spacetype == SPACE_CLIP) { + SpaceClip *sclip = sa->spacedata.first; + sclip->around = V3D_AROUND_CENTER_MEDIAN; + } } } |