GP: Move init code to new version section

This commit is contained in:
2018-11-04 19:52:42 +01:00
parent 665efe401a
commit bbb348afc1

View File

@@ -2237,17 +2237,12 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
}
/* TODO: add to next version bump */
{
if (!MAIN_VERSION_ATLEAST(bmain, 280, 30)) {
/* grease pencil main material show switches */
for (Material *mat = bmain->mat.first; mat; mat = mat->id.next) {
if (mat->gp_style) {
if (((mat->gp_style->flag & GP_STYLE_STROKE_SHOW) == 0) &&
((mat->gp_style->flag & GP_STYLE_FILL_SHOW) == 0))
{
mat->gp_style->flag |= GP_STYLE_STROKE_SHOW;
mat->gp_style->flag |= GP_STYLE_FILL_SHOW;
}
mat->gp_style->flag |= GP_STYLE_STROKE_SHOW;
mat->gp_style->flag |= GP_STYLE_FILL_SHOW;
}
}
}