[Bf-blender-cvs] [2bad126999b] master: Fix T62057: Particle settings keyframes not showing in Graph Editor channels

Joshua Leung noreply at git.blender.org
Fri Mar 1 14:31:02 CET 2019


Commit: 2bad126999b2094e685fb8599bb4d39b76a38a2e
Author: Joshua Leung
Date:   Sat Mar 2 02:10:43 2019 +1300
Branches: master
https://developer.blender.org/rB2bad126999b2094e685fb8599bb4d39b76a38a2e

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...

===================================================================

M	source/blender/editors/animation/anim_channels_defines.c

===================================================================

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 */



More information about the Bf-blender-cvs mailing list