[Bf-blender-cvs] [2c34d44d28d] modifier-panels-ui: Add versioning code
Hans Goudey
noreply at git.blender.org
Mon Apr 27 23:38:22 CEST 2020
Commit: 2c34d44d28d5dc5db61ca53cd1ffb0df67628c34
Author: Hans Goudey
Date: Wed Apr 22 15:53:33 2020 -0500
Branches: modifier-panels-ui
https://developer.blender.org/rB2c34d44d28d5dc5db61ca53cd1ffb0df67628c34
Add versioning code
===================================================================
M source/blender/blenloader/intern/versioning_290.c
===================================================================
diff --git a/source/blender/blenloader/intern/versioning_290.c b/source/blender/blenloader/intern/versioning_290.c
index 0ce3cf405cd..2ea3b352b1d 100644
--- a/source/blender/blenloader/intern/versioning_290.c
+++ b/source/blender/blenloader/intern/versioning_290.c
@@ -24,6 +24,7 @@
#include "BLI_utildefines.h"
#include "DNA_genfile.h"
+#include "DNA_modifier_types.h"
#include "DNA_screen_types.h"
#include "BKE_collection.h"
@@ -62,5 +63,20 @@ void blo_do_versions_290(FileData *fd, Library *UNUSED(lib), Main *bmain)
}
}
}
+
+ /* Transition to saving expansion for all of a modifier's subpanels. */
+ if (!DNA_struct_elem_find(fd->filesdna, "SolidifyModifierData", "short", "ui_expand_flag")) {
+ printf("DOING VERIONING!\n");
+ for (Object *object = bmain->objects.first; object != NULL; object = object->id.next) {
+ LISTBASE_FOREACH (ModifierData *, md, &object->modifiers) {
+ if (md->mode & eModifierMode_Expanded_DEPRECATED) {
+ md->ui_expand_flag = 1;
+ }
+ else {
+ md->ui_expand_flag = 0;
+ }
+ }
+ }
+ }
}
}
More information about the Bf-blender-cvs
mailing list