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>2018-05-23 16:59:15 +0300
committerJoshua Leung <aligorith@gmail.com>2018-05-23 17:32:46 +0300
commita3ad55b346efae356dc4b86bc520d3d1b1215a32 (patch)
treee6b9dad9ed765c0c7a8069b94d00f105366f37a0 /source/blender/editors/space_graph
parent57b47ebb284c03fd6d9863bf0ec9ddbb672e2034 (diff)
Drivers UI: Get rid of dedicated button to remove active driver
There are multiple other ways to do it. Leaving this here just made it easy (and dangerous) to accidentally remove the driver, and was causing other problems with other layouts.
Diffstat (limited to 'source/blender/editors/space_graph')
-rw-r--r--source/blender/editors/space_graph/graph_buttons.c23
1 files changed, 0 insertions, 23 deletions
diff --git a/source/blender/editors/space_graph/graph_buttons.c b/source/blender/editors/space_graph/graph_buttons.c
index d7905a0c2d9..3f5cbd166c2 100644
--- a/source/blender/editors/space_graph/graph_buttons.c
+++ b/source/blender/editors/space_graph/graph_buttons.c
@@ -485,23 +485,6 @@ static void do_graph_region_driver_buttons(bContext *C, void *UNUSED(arg), int e
WM_event_add_notifier(C, NC_SCENE | ND_FRAME, scene); // XXX could use better notifier
}
-/* callback to remove the active driver */
-static void driver_remove_cb(bContext *C, void *ale_v, void *UNUSED(arg))
-{
- bAnimListElem *ale = (bAnimListElem *)ale_v;
- ID *id = ale->id;
- FCurve *fcu = ale->data;
- ReportList *reports = CTX_wm_reports(C);
-
- /* try to get F-Curve that driver lives on, and ID block which has this AnimData */
- if (ELEM(NULL, id, fcu))
- return;
-
- /* call API method to remove this driver */
- ANIM_remove_driver(reports, id, fcu->rna_path, fcu->array_index, 0);
- ED_undo_push(C, "Remove Driver");
-}
-
/* callback to add a target variable to the active driver */
static void driver_add_var_cb(bContext *C, void *driver_v, void *UNUSED(arg))
{
@@ -798,12 +781,6 @@ static void graph_panel_drivers(const bContext *C, Panel *pa)
TIP_("Force updates of dependencies"));
UI_but_func_set(but, driver_update_flags_cb, fcu, NULL);
- but = uiDefIconTextBut(block, UI_BTYPE_BUT, B_IPO_DEPCHANGE, ICON_X, "",
- 0, 0, UI_UNIT_X, UI_UNIT_Y,
- NULL, 0.0, 0.0, 0, 0,
- TIP_("Remove this driver"));
- UI_but_funcN_set(but, driver_remove_cb, MEM_dupallocN(ale), NULL);
-
/* driver-level settings - type, expressions, and errors */
RNA_pointer_create(ale->id, &RNA_Driver, driver, &driver_ptr);