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:
authorJoshua Leung <aligorith@gmail.com>2019-03-01 16:10:43 +0300
committerJoshua Leung <aligorith@gmail.com>2019-03-01 16:30:31 +0300
commit2bad126999b2094e685fb8599bb4d39b76a38a2e (patch)
treebe8dcf64d3a8b9a48487229986515b617edc054a /source/blender/editors/animation/anim_channels_defines.c
parentbbe98b18fb4c2b72c71367e61a066da62523f051 (diff)
Fix T62057: Particle settings keyframes not showing in Graph Editor channels
In short, the settings to expand/collapse the Particles Animation Dopesheet expander were no longer getting exposed, so the F-Curves attached to the particle settings were not showing up in the channels list as that section was collapsed and couldn't be opened from the UI. Early on during the development of 2.8, we originally wanted to completely remove the Particle System. Eventually that decision got walked back, and so particles were reinstated. Well... most of the relevant code was! One of the areas that was the most messed up during this process was the animation editor support for these channels. It seems that there was almost a two-step removal process here - the first pass tried to keep the channel definitions while removing all references to particle stuff, while the second pass tried to remove the definitions completely and/or re-added them in the wrong places, etc. To say the removal/reverting history is here is "colourful" is an understatement...
Diffstat (limited to 'source/blender/editors/animation/anim_channels_defines.c')
-rw-r--r--source/blender/editors/animation/anim_channels_defines.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/source/blender/editors/animation/anim_channels_defines.c b/source/blender/editors/animation/anim_channels_defines.c
index 29ae22cd306..d1cef1cfa17 100644
--- a/source/blender/editors/animation/anim_channels_defines.c
+++ b/source/blender/editors/animation/anim_channels_defines.c
@@ -2028,7 +2028,7 @@ static int acf_dspart_setting_flag(bAnimContext *UNUSED(ac), eAnimChannel_Settin
switch (setting) {
case ACHANNEL_SETTING_EXPAND: /* expanded */
- return 0;
+ return PART_DS_EXPAND;
case ACHANNEL_SETTING_MUTE: /* mute (only in NLA) */
return ADT_NLA_EVAL_OFF;
@@ -2046,18 +2046,22 @@ static int acf_dspart_setting_flag(bAnimContext *UNUSED(ac), eAnimChannel_Settin
}
/* get pointer to the setting */
-static void *acf_dspart_setting_ptr(bAnimListElem *UNUSED(ale), eAnimChannel_Settings setting, short *type)
+static void *acf_dspart_setting_ptr(bAnimListElem *ale, eAnimChannel_Settings setting, short *type)
{
+ ParticleSettings *part = (ParticleSettings *)ale->data;
+
/* clear extra return data first */
*type = 0;
switch (setting) {
case ACHANNEL_SETTING_EXPAND: /* expanded */
- return NULL;
+ return GET_ACF_FLAG_PTR(part->flag, type);
case ACHANNEL_SETTING_SELECT: /* selected */
case ACHANNEL_SETTING_MUTE: /* muted (for NLA only) */
case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
+ if (part->adt)
+ return GET_ACF_FLAG_PTR(part->adt->flag, type);
return NULL;
default: /* unsupported */