Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Goudey <h.goudey@me.com>2021-02-19 19:11:35 +0300
committerHans Goudey <h.goudey@me.com>2021-02-19 19:11:35 +0300
commit1f5647c07d15d2b298b491ebe260a411f7b0d1b8 (patch)
tree7776a1724a24fa4391f2fd1c93827c2d4de63d63 /source/blender/blenloader
parent0d94695cc458b1f7666104314b57b174f0ee93d1 (diff)
UI: FModifier layout updates, drag and drop
This patch implements the list panel system D7490 for FCurve modifiers. The UI layouts are updated to make use of subpanels and to be consistent with the rest of the interface, and easier to understand. See the differential revision for screenshots. This commit also significantly cleans up the FModifier UI code, and improves, mainly by replacing the old button creation code is with the newer interface API using RNA. In turn there is a bit of complexity added because each FModifier has a separate panel. Although reordering of FModifiers was not implemented before, we get drag and drop basically for free here, so it is also included. As noted in some older to do tasks, FModifiers aren't evaluated in perfect order, which may be a point of improvement for the future. Differential Revision: https://developer.blender.org/D7997
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/intern/versioning_290.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/versioning_290.c b/source/blender/blenloader/intern/versioning_290.c
index 089886a1c25..728235e84bf 100644
--- a/source/blender/blenloader/intern/versioning_290.c
+++ b/source/blender/blenloader/intern/versioning_290.c
@@ -1748,6 +1748,19 @@ void blo_do_versions_290(FileData *fd, Library *UNUSED(lib), Main *bmain)
}
}
+ /* Add subpanels for FModifiers, which requires a field to store expansion. */
+ if (!DNA_struct_elem_find(fd->filesdna, "FModifier", "short", "ui_expand_flag")) {
+ LISTBASE_FOREACH (bAction *, act, &bmain->actions) {
+ LISTBASE_FOREACH (FCurve *, fcu, &act->curves) {
+ LISTBASE_FOREACH (FModifier *, fcm, &fcu->modifiers) {
+ SET_FLAG_FROM_TEST(fcm->ui_expand_flag,
+ fcm->flag & FMODIFIER_FLAG_EXPANDED,
+ UI_PANEL_DATA_EXPAND_ROOT);
+ }
+ }
+ }
+ }
+
/* Keep this block, even when empty. */
}
}