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/makesdna/DNA_anim_types.h
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/makesdna/DNA_anim_types.h')
-rw-r--r--source/blender/makesdna/DNA_anim_types.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/source/blender/makesdna/DNA_anim_types.h b/source/blender/makesdna/DNA_anim_types.h
index 4e37a6652a5..c9abb4fb5be 100644
--- a/source/blender/makesdna/DNA_anim_types.h
+++ b/source/blender/makesdna/DNA_anim_types.h
@@ -57,6 +57,13 @@ typedef struct FModifier {
short type;
/** Settings for the modifier. */
short flag;
+ /**
+ * Expansion state for the modifier panel and its subpanels, stored as a bitfield
+ * in depth-first order. (Maximum of sizeof(short) total panels).
+ */
+ short ui_expand_flag;
+
+ char _pad[6];
/** The amount that the modifier should influence the value. */
float influence;
@@ -96,8 +103,10 @@ typedef enum eFModifier_Types {
typedef enum eFModifier_Flags {
/** Modifier is not able to be evaluated for some reason, and should be skipped (internal). */
FMODIFIER_FLAG_DISABLED = (1 << 0),
- /** Modifier's data is expanded (in UI). */
+#ifdef DNA_DEPRECATED_ALLOW
+ /** Modifier's data is expanded (in UI). Deprecated, use `ui_expand_flag`. */
FMODIFIER_FLAG_EXPANDED = (1 << 1),
+#endif
/** Modifier is active one (in UI) for editing purposes. */
FMODIFIER_FLAG_ACTIVE = (1 << 2),
/** User wants modifier to be skipped. */