diff options
author | Hans Goudey <h.goudey@me.com> | 2020-06-19 22:07:13 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2020-06-19 22:07:13 +0300 |
commit | bb4cef71eeaf36aa61187d47b8a8ae06ba55f7c0 (patch) | |
tree | 35700820beee851c984c9162d40952387cca5e39 /source/blender/blenloader/intern/versioning_290.c | |
parent | 702e00f91088031f83cfed1528d5ed22069a9d35 (diff) |
UI: ShaderFx Drag and Drop, Layout Updates
This patch implements the list panel system D7490 for grease pencil
shader effects. It also moves their drawing to a callback in
ShaderFxTypeInfo in line with the extensible architecture refactoring
goal T75724.
The implementation is basically exactly the same as for the modifier
patch (9b099c86123fc82).
Thanks to Matias Mendiola (@mendio) for helping to develop the layout
changes.
Differential Revision: https://developer.blender.org/D7985
Diffstat (limited to 'source/blender/blenloader/intern/versioning_290.c')
-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; + } + } + } + } } } |