[Bf-blender-cvs] [157e6ef] input_method_editor: Fix T42662 hide unselected does not reveal selected.
Antony Riakiotakis
noreply at git.blender.org
Mon Nov 24 00:45:07 CET 2014
Commit: 157e6ef22df00af72cbd9d7ebc377cb27e2db47c
Author: Antony Riakiotakis
Date: Thu Nov 20 18:11:12 2014 +0100
Branches: input_method_editor
https://developer.blender.org/rB157e6ef22df00af72cbd9d7ebc377cb27e2db47c
Fix T42662 hide unselected does not reveal selected.
Not sure if this is a bugfix exactly but should help the gooseberry team
with their workflow.
===================================================================
M source/blender/editors/space_graph/graph_ops.c
===================================================================
diff --git a/source/blender/editors/space_graph/graph_ops.c b/source/blender/editors/space_graph/graph_ops.c
index 6197ddf..07155eb 100644
--- a/source/blender/editors/space_graph/graph_ops.c
+++ b/source/blender/editors/space_graph/graph_ops.c
@@ -245,13 +245,38 @@ static int graphview_curves_hide_exec(bContext *C, wmOperator *op)
ANIM_channel_setting_set(&ac, ale, ACHANNEL_SETTING_SELECT, ACHANNEL_SETFLAG_CLEAR);
/* now, also flush selection status up/down as appropriate */
- ANIM_flush_setting_anim_channels(&ac, &all_data, ale, ACHANNEL_SETTING_VISIBLE, false);
+ ANIM_flush_setting_anim_channels(&ac, &all_data, ale, ACHANNEL_SETTING_VISIBLE, ACHANNEL_SETFLAG_CLEAR);
}
-
+
/* cleanup */
ANIM_animdata_freelist(&anim_data);
BLI_freelistN(&all_data);
+ /* unhide selected */
+ if (unselected) {
+ /* turn off requirement for visible */
+ filter = ANIMFILTER_SEL | ANIMFILTER_NODUPLIS | ANIMFILTER_LIST_CHANNELS;
+
+ /* flushing has been done */
+ ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
+
+ for (ale = anim_data.first; ale; ale = ale->next) {
+ /* hack: skip object channels for now, since flushing those will always flush everything, but they are always included */
+ /* TODO: find out why this is the case, and fix that */
+ if (ale->type == ANIMTYPE_OBJECT)
+ continue;
+
+ /* change the hide setting, and unselect it... */
+ ANIM_channel_setting_set(&ac, ale, ACHANNEL_SETTING_VISIBLE, ACHANNEL_SETFLAG_ADD);
+ ANIM_channel_setting_set(&ac, ale, ACHANNEL_SETTING_SELECT, ACHANNEL_SETFLAG_ADD);
+
+ /* now, also flush selection status up/down as appropriate */
+ ANIM_flush_setting_anim_channels(&ac, &anim_data, ale, ACHANNEL_SETTING_VISIBLE, ACHANNEL_SETFLAG_ADD);
+ }
+ ANIM_animdata_freelist(&anim_data);
+ }
+
+
/* send notifier that things have changed */
WM_event_add_notifier(C, NC_ANIMATION | ND_ANIMCHAN | NA_EDITED, NULL);
More information about the Bf-blender-cvs
mailing list