diff options
author | YimingWu <xp8110@outlook.com> | 2021-04-29 16:04:55 +0300 |
---|---|---|
committer | YimingWu <xp8110@outlook.com> | 2021-05-18 17:16:39 +0300 |
commit | 7c979ad568d275b766c5d4e25020648175ae8ef6 (patch) | |
tree | b31bc569de0f6b85fb32e0c990bc4f121367e394 /source/blender/blenloader | |
parent | e06e13a56ede8e3cba21c0bc4902447aa3eb8796 (diff) |
LineArt: UI grey out for cache mode.
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/versioning_300.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/versioning_300.c b/source/blender/blenloader/intern/versioning_300.c index 8c5e86eadd3..b68f65a9c39 100644 --- a/source/blender/blenloader/intern/versioning_300.c +++ b/source/blender/blenloader/intern/versioning_300.c @@ -26,6 +26,7 @@ #include "DNA_brush_types.h" #include "DNA_genfile.h" +#include "DNA_gpencil_modifier_types.h" #include "DNA_modifier_types.h" #include "DNA_text_types.h" @@ -131,5 +132,18 @@ void blo_do_versions_300(FileData *fd, Library *UNUSED(lib), Main *bmain) } } } + if (!DNA_struct_elem_find( + fd->filesdna, "LineartGpencilModifierData", "bool", "use_cached_result")) { + LISTBASE_FOREACH (Object *, ob, &bmain->objects) { + if (ob->type == OB_GPENCIL) { + LISTBASE_FOREACH (GpencilModifierData *, md, &ob->greasepencil_modifiers) { + if (md->type == eGpencilModifierType_Lineart) { + LineartGpencilModifierData *lmd = (LineartGpencilModifierData *)md; + lmd->flags |= LRT_GPENCIL_USE_CACHE; + } + } + } + } + } } } |