diff options
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/versioning_290.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/versioning_290.c b/source/blender/blenloader/intern/versioning_290.c index 00c73ebe9a7..bf4ed270e33 100644 --- a/source/blender/blenloader/intern/versioning_290.c +++ b/source/blender/blenloader/intern/versioning_290.c @@ -30,6 +30,7 @@ #include "DNA_modifier_types.h" #include "DNA_object_types.h" #include "DNA_screen_types.h" +#include "DNA_shader_fx_types.h" #include "BKE_collection.h" #include "BKE_colortools.h" @@ -317,5 +318,19 @@ void blo_do_versions_290(FileData *fd, Library *UNUSED(lib), Main *bmain) } } } + + /* Transition to saving expansion for all of an effect's subpanels. */ + if (!DNA_struct_elem_find(fd->filesdna, "ShaderFxData", "short", "ui_expand_flag")) { + for (Object *object = bmain->objects.first; object != NULL; object = object->id.next) { + LISTBASE_FOREACH (ShaderFxData *, fx, &object->shader_fx) { + if (fx->mode & eShaderFxMode_Expanded_DEPRECATED) { + fx->ui_expand_flag = 1; + } + else { + fx->ui_expand_flag = 0; + } + } + } + } } } |