GPencil: Bump subversion and ensure that the datablock-level onionskinning flag is set correctly
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user