[Bf-blender-cvs] [d110636] experimental-build: Revert "Auto-Focus Channels, squashed commit"
Julian Eisel
noreply at git.blender.org
Thu Feb 19 19:32:15 CET 2015
Commit: d110636ce0469647e4a7ce1756aee153b66c9e10
Author: Julian Eisel
Date: Thu Feb 19 19:31:39 2015 +0100
Branches: experimental-build
https://developer.blender.org/rBd110636ce0469647e4a7ce1756aee153b66c9e10
Revert "Auto-Focus Channels, squashed commit"
This reverts commit 1b5cc34ebaf23c7ad480b55a7e5e30cd05eb81a1.
===================================================================
M release/scripts/startup/bl_ui/space_graph.py
M source/blender/editors/animation/anim_channels_edit.c
M source/blender/editors/include/ED_anim_api.h
M source/blender/editors/space_graph/graph_edit.c
M source/blender/makesdna/DNA_space_types.h
M source/blender/makesrna/intern/rna_space.c
===================================================================
diff --git a/release/scripts/startup/bl_ui/space_graph.py b/release/scripts/startup/bl_ui/space_graph.py
index 22cb005..d3e1a86 100644
--- a/release/scripts/startup/bl_ui/space_graph.py
+++ b/release/scripts/startup/bl_ui/space_graph.py
@@ -94,7 +94,6 @@ class GRAPH_MT_view(Menu):
layout.prop(st, "show_sliders")
layout.prop(st, "show_group_colors")
layout.prop(st, "use_auto_merge_keyframes")
- layout.prop(st, "use_auto_focus_channels")
layout.separator()
layout.prop(st, "use_beauty_drawing")
diff --git a/source/blender/editors/animation/anim_channels_edit.c b/source/blender/editors/animation/anim_channels_edit.c
index ff98276..d8ad650 100644
--- a/source/blender/editors/animation/anim_channels_edit.c
+++ b/source/blender/editors/animation/anim_channels_edit.c
@@ -221,9 +221,8 @@ void ANIM_set_active_channel(bAnimContext *ac, void *data, eAnimCont_Types datat
* - datatype: the type of data that 'data' represents (eAnimCont_Types)
* - test: check if deselecting instead of selecting
* - sel: eAnimChannels_SetFlag;
- * returns sel to give feedback on the type of the performed selection
*/
-short ANIM_deselect_anim_channels(bAnimContext *ac, void *data, eAnimCont_Types datatype, bool test, eAnimChannels_SetFlag sel)
+void ANIM_deselect_anim_channels(bAnimContext *ac, void *data, eAnimCont_Types datatype, bool test, eAnimChannels_SetFlag sel)
{
ListBase anim_data = {NULL, NULL};
bAnimListElem *ale;
@@ -406,8 +405,6 @@ short ANIM_deselect_anim_channels(bAnimContext *ac, void *data, eAnimCont_Types
/* Cleanup */
ANIM_animdata_freelist(&anim_data);
-
- return sel;
}
/* ---------------------------- Graph Editor ------------------------------------- */
@@ -2225,40 +2222,24 @@ static void ANIM_OT_channels_find(wmOperatorType *ot)
static int animchannels_deselectall_exec(bContext *C, wmOperator *op)
{
- ListBase anim_data = {NULL, NULL};
bAnimContext ac;
- int filter;
/* get editor data */
if (ANIM_animdata_get_context(C, &ac) == 0)
return OPERATOR_CANCELLED;
-
- filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_LIST_CHANNELS);
- ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
/* 'standard' behavior - check if selected, then apply relevant selection */
- if (RNA_boolean_get(op->ptr, "invert")) {
+ if (RNA_boolean_get(op->ptr, "invert"))
ANIM_deselect_anim_channels(&ac, ac.data, ac.datatype, false, ACHANNEL_SETFLAG_INVERT);
-
- graph_channel_focus_selection(C, &ac, &anim_data, true);
- }
- else {
- short setflag = ANIM_deselect_anim_channels(&ac, ac.data, ac.datatype, true, ACHANNEL_SETFLAG_ADD);
-
- /* don't use "Auto-Focus Channels" after deselecting */
- if (setflag != ACHANNEL_SETFLAG_CLEAR)
- graph_channel_focus_selection(C, &ac, &anim_data, false);
- }
-
- /* free channels */
- ANIM_animdata_freelist(&anim_data);
+ else
+ ANIM_deselect_anim_channels(&ac, ac.data, ac.datatype, true, ACHANNEL_SETFLAG_ADD);
/* send notifier that things have changed */
WM_event_add_notifier(C, NC_ANIMATION | ND_ANIMCHAN | NA_SELECTED, NULL);
return OPERATOR_FINISHED;
}
-
+
static void ANIM_OT_channels_select_all_toggle(wmOperatorType *ot)
{
/* identifiers */
@@ -2279,7 +2260,7 @@ static void ANIM_OT_channels_select_all_toggle(wmOperatorType *ot)
/* ******************** Borderselect Operator *********************** */
-static void borderselect_anim_channels(bContext *C, bAnimContext *ac, rcti *rect, short selectmode)
+static void borderselect_anim_channels(bAnimContext *ac, rcti *rect, short selectmode)
{
ListBase anim_data = {NULL, NULL};
bAnimListElem *ale;
@@ -2373,8 +2354,6 @@ static void borderselect_anim_channels(bContext *C, bAnimContext *ac, rcti *rect
ymax = ymin;
}
- graph_channel_focus_selection(C, ac, &anim_data, false);
-
/* cleanup */
ANIM_animdata_freelist(&anim_data);
}
@@ -2408,7 +2387,7 @@ static int animchannels_borderselect_exec(bContext *C, wmOperator *op)
selectmode = ACHANNEL_SETFLAG_CLEAR;
/* apply borderselect animation channels */
- borderselect_anim_channels(C, &ac, &rect, selectmode);
+ borderselect_anim_channels(&ac, &rect, selectmode);
/* send notifier that things have changed */
WM_event_add_notifier(C, NC_ANIMATION | ND_ANIMCHAN | NA_SELECTED, NULL);
@@ -2860,8 +2839,6 @@ static int mouse_anim_channels(bContext *C, bAnimContext *ac, int channel_index,
break;
}
- graph_channel_focus_selection(C, ac, &anim_data, true);
-
/* free channels */
ANIM_animdata_freelist(&anim_data);
diff --git a/source/blender/editors/include/ED_anim_api.h b/source/blender/editors/include/ED_anim_api.h
index f73e368..5058142 100644
--- a/source/blender/editors/include/ED_anim_api.h
+++ b/source/blender/editors/include/ED_anim_api.h
@@ -490,7 +490,7 @@ void ANIM_flush_setting_anim_channels(bAnimContext *ac, ListBase *anim_data, bAn
/* Deselect all animation channels */
-short ANIM_deselect_anim_channels(bAnimContext *ac, void *data, eAnimCont_Types datatype, bool test, eAnimChannels_SetFlag sel);
+void ANIM_deselect_anim_channels(bAnimContext *ac, void *data, eAnimCont_Types datatype, bool test, eAnimChannels_SetFlag sel);
/* Set the 'active' channel of type channel_type, in the given action */
void ANIM_set_active_channel(bAnimContext *ac, void *data, eAnimCont_Types datatype, eAnimFilter_Flags filter, void *channel_data, eAnim_ChannelType channel_type);
@@ -585,8 +585,6 @@ void ANIM_nla_mapping_apply_fcurve(struct AnimData *adt, struct FCurve *fcu, boo
// NOTE: defined in space_nla/nla_edit.c, not in animation/
void ED_nla_postop_refresh(bAnimContext *ac);
-void graph_channel_focus_selection(struct bContext *C, bAnimContext *ac, ListBase *anim_data, const bool unhide);
-
/* ------------- Unit Conversion Mappings ------------- */
/* anim_draw.c */
diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c
index 92e1df9..2944901 100644
--- a/source/blender/editors/space_graph/graph_edit.c
+++ b/source/blender/editors/space_graph/graph_edit.c
@@ -167,51 +167,6 @@ void get_graph_keyframe_extents(bAnimContext *ac, float *xmin, float *xmax, floa
}
}
-
-/* ****************** Auto-Focus Channel ****************** */
-
-void graph_channel_focus_selection(bContext *C, bAnimContext *ac, ListBase *anim_data, const bool unhide)
-{
- const SpaceIpo *sipo = CTX_wm_space_graph(C);
- bAnimListElem *ale;
- bool is_any_visible = false;
-
- /* graph editor only */
- if (sipo == NULL)
- return;
-
- /* only if auto-focus channels is enabled */
- if ((sipo->flag & SIPO_AUTO_FOCUS_CHANNELS) == 0)
- return;
-
- for (ale = anim_data->first; ale; ale = ale->next) {
- /* make selected elements visible */
- if (ANIM_channel_setting_get(ac, ale, ACHANNEL_SETTING_SELECT)) {
- /* unhiding selected channels and thereby overriding their visibility is not always wanted */
- if (unhide) {
- ANIM_channel_setting_set(ac, ale, ACHANNEL_SETTING_VISIBLE, ACHANNEL_SETFLAG_ADD);
- ANIM_flush_setting_anim_channels(ac, anim_data, ale, ACHANNEL_SETTING_VISIBLE, ACHANNEL_SETFLAG_ADD);
- }
- }
- /* make unselected elements hidden */
- else {
- ANIM_channel_setting_set(ac, ale, ACHANNEL_SETTING_VISIBLE, ACHANNEL_SETFLAG_CLEAR);
- ANIM_flush_setting_anim_channels(ac, anim_data, ale, ACHANNEL_SETTING_VISIBLE, ACHANNEL_SETFLAG_CLEAR);
- }
-
- if (!(ELEM(ale->type, ANIMTYPE_OBJECT, ANIMTYPE_FILLACTD)) && /* XXX more cases? - need help! */
- (ANIM_channel_setting_get(ac, ale, ACHANNEL_SETTING_VISIBLE)))
- {
- is_any_visible = true;
- }
- }
-
- /* align the view to visible curves using view_all operator, but only if there is a visible channel */
- if (is_any_visible) {
- WM_operator_name_call(C, "GRAPH_OT_view_all", WM_OP_EXEC_REGION_WIN, NULL);
- }
-}
-
/* ****************** Automatic Preview-Range Operator ****************** */
static int graphkeys_previewrange_exec(bContext *C, wmOperator *UNUSED(op))
diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h
index 55b514a..69affc7 100644
--- a/source/blender/makesdna/DNA_space_types.h
+++ b/source/blender/makesdna/DNA_space_types.h
@@ -371,8 +371,6 @@ typedef enum eGraphEdit_Flag {
/* normalize curves on display */
SIPO_NORMALIZE = (1 << 14),
SIPO_NORMALIZE_FREEZE = (1 << 15),
- /* automatically focus on selected channels */
- SIPO_AUTO_FOCUS_CHANNELS = (1 << 16),
} eGraphEdit_Flag;
/* SpaceIpo->mode (Graph Editor Mode) */
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index 8216db7..13ec2dd 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -3234,11 +3234,7 @@ static void rna_def_space_graph(BlenderRNA *brna)
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SIPO_NOTRANSKEYCULL);
RNA_def_property_ui_text(prop, "AutoMerge Keyframes", "Automatically merge nearby keyframes");
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_GRAPH, NULL);
-
- prop = RNA_def_property(srna, "use_auto_focus_channels", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", SIPO_AUTO_FOCUS_CHANNELS);
- RNA_def_property_ui_text(prop, "Auto-Focus Channels", "Automatically focus on selected channels");
-
+
prop = RNA_def_property(srna, "use_realtime_update", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SIPO_NOREALTIMEUPDATES);
RNA_def_property_ui_text(prop, "Realtime Updates",
More information about the Bf-blender-cvs
mailing list