From 8ab1188e395409eb0fd72a946a691482d660b7c6 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 7 Feb 2015 03:46:05 +1100 Subject: [PATCH] rename SIPO_AUTOVIEW -> SIPO_AUTO_VIEW_SELECTED The term auto-view on its own isn't very meaningful --- release/scripts/startup/bl_ui/space_graph.py | 2 +- source/blender/editors/space_graph/graph_select.c | 5 +++-- source/blender/makesdna/DNA_space_types.h | 2 +- source/blender/makesrna/intern/rna_space.c | 6 +++--- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/release/scripts/startup/bl_ui/space_graph.py b/release/scripts/startup/bl_ui/space_graph.py index 50bbc3cea76..f333bff4bf3 100644 --- a/release/scripts/startup/bl_ui/space_graph.py +++ b/release/scripts/startup/bl_ui/space_graph.py @@ -41,7 +41,7 @@ class GRAPH_HT_header(Header): dopesheet_filter(layout, context) - layout.prop(st, "use_auto_view", text="Auto View") + layout.prop(st, "use_auto_view_selected", text="Auto View") layout.prop(st, "use_normalization", text="Normalize") row = layout.row() diff --git a/source/blender/editors/space_graph/graph_select.c b/source/blender/editors/space_graph/graph_select.c index 136bcb6fb05..46a39806ad7 100644 --- a/source/blender/editors/space_graph/graph_select.c +++ b/source/blender/editors/space_graph/graph_select.c @@ -70,8 +70,9 @@ static void graphkeys_auto_view(bContext *C) { const SpaceIpo *sipo = CTX_wm_space_graph(C); - if (sipo && sipo->flag & SIPO_AUTOVIEW) + if (sipo && sipo->flag & SIPO_AUTO_VIEW_SELECTED) { WM_operator_name_call(C, "GRAPH_OT_view_selected", WM_OP_INVOKE_DEFAULT, NULL); + } } /* ******************** Deselect All Operator ***************************** */ @@ -875,7 +876,7 @@ static void select_moreless_graph_keys(bContext *C, bAnimContext *ac, short mode ked.data = NULL; /* only do auto view if a bezier point is selected */ - if (sipo->flag & SIPO_AUTOVIEW) { + if (sipo->flag & SIPO_AUTO_VIEW_SELECTED) { const FCurve *fcu = (FCurve *)ale->key_data; const BezTriple *bezt; unsigned int i; diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h index 4767f05c89b..165f6113b6d 100644 --- a/source/blender/makesdna/DNA_space_types.h +++ b/source/blender/makesdna/DNA_space_types.h @@ -371,7 +371,7 @@ typedef enum eGraphEdit_Flag { SIPO_NORMALIZE = (1 << 14), SIPO_NORMALIZE_FREEZE = (1 << 15), /* automatically set view on selection */ - SIPO_AUTOVIEW = (1 << 16), + SIPO_AUTO_VIEW_SELECTED = (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 4017ce683b7..382ed358e12 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -3004,9 +3004,9 @@ static void rna_def_space_graph(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Has Ghost Curves", "Graph Editor instance has some ghost curves stored"); /* auto view */ - prop = RNA_def_property(srna, "use_auto_view", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "flag", SIPO_AUTOVIEW); - RNA_def_property_ui_text(prop, "Use Auto View", "Automatically adjust view based on selection"); + prop = RNA_def_property(srna, "use_auto_view_selected", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", SIPO_AUTO_VIEW_SELECTED); + RNA_def_property_ui_text(prop, "Auto View Selected", "Automatically adjust view based on selection"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_GRAPH, NULL); /* nromalize curves */ -- 2.28.0