diff options
-rw-r--r-- | source/blender/blenkernel/BKE_blender.h | 2 | ||||
-rw-r--r-- | source/blender/blenloader/intern/versioning_270.c | 23 |
2 files changed, 21 insertions, 4 deletions
diff --git a/source/blender/blenkernel/BKE_blender.h b/source/blender/blenkernel/BKE_blender.h index 8734eac8f24..6886740c1af 100644 --- a/source/blender/blenkernel/BKE_blender.h +++ b/source/blender/blenkernel/BKE_blender.h @@ -42,7 +42,7 @@ extern "C" { * and keep comment above the defines. * Use STRINGIFY() rather than defining with quotes */ #define BLENDER_VERSION 276 -#define BLENDER_SUBVERSION 3 +#define BLENDER_SUBVERSION 4 /* Several breakages with 270, e.g. constraint deg vs rad */ #define BLENDER_MINVERSION 270 #define BLENDER_MINSUBVERSION 5 diff --git a/source/blender/blenloader/intern/versioning_270.c b/source/blender/blenloader/intern/versioning_270.c index 8a2045ddacf..8cf933207ab 100644 --- a/source/blender/blenloader/intern/versioning_270.c +++ b/source/blender/blenloader/intern/versioning_270.c @@ -936,9 +936,8 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *main) } } - { - Scene *scene; - for (scene = main->scene.first; scene; scene = scene->id.next) { + if (!MAIN_VERSION_ATLEAST(main, 276, 4)) { + for (Scene *scene = main->scene.first; scene; scene = scene->id.next) { ToolSettings *ts = scene->toolsettings; if (ts->gp_sculpt.brush[0].size == 0) { @@ -1012,5 +1011,23 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *main) ts->gpencil_ima_align = GP_PROJECT_VIEWSPACE; } } + + for (bGPdata *gpd = main->gpencil.first; gpd; gpd = gpd->id.next) { + bool enabled = false; + + /* Ensure that the datablock's onionskinning toggle flag + * stays in sync with the status of the actual layers + */ + for (bGPDlayer *gpl = gpd->layers.first; gpl; gpl = gpl->next) { + if (gpl->flag & GP_LAYER_ONIONSKIN) { + enabled = true; + } + } + + if (enabled) + gpd->flag |= GP_DATA_SHOW_ONIONSKINS; + else + gpd->flag &= ~GP_DATA_SHOW_ONIONSKINS; + } } } |