[Bf-blender-cvs] [fe47f6e56ad] blender2.8: Fix channels region showing in timeline editors in startup templates.
Brecht Van Lommel
noreply at git.blender.org
Thu Oct 4 18:12:57 CEST 2018
Commit: fe47f6e56ade1e413ba30213def917e7ee1afa62
Author: Brecht Van Lommel
Date: Thu Oct 4 18:12:03 2018 +0200
Branches: blender2.8
https://developer.blender.org/rBfe47f6e56ade1e413ba30213def917e7ee1afa62
Fix channels region showing in timeline editors in startup templates.
===================================================================
M source/blender/blenloader/intern/versioning_defaults.c
===================================================================
diff --git a/source/blender/blenloader/intern/versioning_defaults.c b/source/blender/blenloader/intern/versioning_defaults.c
index 1369c943de9..cbe1969f711 100644
--- a/source/blender/blenloader/intern/versioning_defaults.c
+++ b/source/blender/blenloader/intern/versioning_defaults.c
@@ -146,6 +146,21 @@ void BLO_update_defaults_startup_blend(Main *bmain, const char *app_template)
STREQ(app_template, "Video_Editing");
if (builtin_template) {
+ for (bScreen *screen = bmain->screen.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 (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;
+ }
+ }
+ }
+ }
+ }
+
for (Scene *scene = bmain->scene.first; scene; scene = scene->id.next) {
BLI_strncpy(scene->r.engine, RE_engine_id_BLENDER_EEVEE, sizeof(scene->r.engine));
More information about the Bf-blender-cvs
mailing list