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/blenkernel/intern/fmodifier.c
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/blenkernel/intern/fmodifier.c')
-rw-r--r--source/blender/blenkernel/intern/fmodifier.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/fmodifier.c b/source/blender/blenkernel/intern/fmodifier.c
index d0018a556ba..4cd49987a83 100644
--- a/source/blender/blenkernel/intern/fmodifier.c
+++ b/source/blender/blenkernel/intern/fmodifier.c
@@ -32,6 +32,7 @@
#include "CLG_log.h"
#include "DNA_anim_types.h"
+#include "DNA_screen_types.h"
#include "BLT_translation.h"
@@ -1133,7 +1134,7 @@ FModifier *add_fmodifier(ListBase *modifiers, int type, FCurve *owner_fcu)
/* add modifier itself */
fcm = MEM_callocN(sizeof(FModifier), "F-Curve Modifier");
fcm->type = type;
- fcm->flag = FMODIFIER_FLAG_EXPANDED;
+ fcm->ui_expand_flag = UI_PANEL_DATA_EXPAND_ROOT; /* Expand the main panel, not the subpanels. */
fcm->curve = owner_fcu;
fcm->influence = 1.0f;
BLI_addtail(modifiers, fcm);