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>2010-02-09 11:38:45 +0300
committerJoshua Leung <aligorith@gmail.com>2010-02-09 11:38:45 +0300
commit3563118ae4af6fc02a368bee9bb501158dee6e4a (patch)
tree6d760ae7f05a5d1cb87a4fc45e2900713d7c5125 /source/blender/editors/animation/anim_channels_edit.c
parentab6c82521c63af418fc3a89e55c1a3c0182817fe (diff)
Bugfix #21029: Animation editor's channel-group check boxes behave oddly
This commit fixes the first issue in the report - deselecting unselected channels does not flush the change in state - which resulted in the channels of collapsed and unselected groups not getting unselected too (a consistency issue).
Diffstat (limited to 'source/blender/editors/animation/anim_channels_edit.c')
-rw-r--r--source/blender/editors/animation/anim_channels_edit.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/source/blender/editors/animation/anim_channels_edit.c b/source/blender/editors/animation/anim_channels_edit.c
index fba6d56fcc6..ff0755484e3 100644
--- a/source/blender/editors/animation/anim_channels_edit.c
+++ b/source/blender/editors/animation/anim_channels_edit.c
@@ -1064,21 +1064,26 @@ static int animchannels_visibility_set_exec(bContext *C, wmOperator *op)
if (ANIM_animdata_get_context(C, &ac) == 0)
return OPERATOR_CANCELLED;
+ /* get list of all channels that selection may need to be flushed to */
+ filter= ANIMFILTER_CHANNELS;
+ ANIM_animdata_filter(&ac, &all_data, filter, ac.data, ac.datatype);
/* hide all channels not selected */
filter= (ANIMFILTER_VISIBLE | ANIMFILTER_UNSEL);
ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
- for (ale= anim_data.first; ale; ale= ale->next)
+ for (ale= anim_data.first; ale; ale= ale->next) {
+ /* clear setting first */
ANIM_channel_setting_set(&ac, ale, ACHANNEL_SETTING_VISIBLE, ACHANNEL_SETFLAG_CLEAR);
+
+ /* now also flush selection status as appropriate
+ * NOTE: in some cases, this may result in repeat flushing being performed
+ */
+ ANIM_flush_setting_anim_channels(&ac, &all_data, ale, ACHANNEL_SETTING_VISIBLE, 0);
+ }
BLI_freelistN(&anim_data);
-
- /* get list of all channels that selection may need to be flushed to */
- filter= ANIMFILTER_CHANNELS;
- ANIM_animdata_filter(&ac, &all_data, filter, ac.data, ac.datatype);
-
/* make all the selected channels visible */
filter= (ANIMFILTER_VISIBLE | ANIMFILTER_SEL);
ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);