diff options
author | Joshua Leung <aligorith@gmail.com> | 2010-12-28 08:45:15 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2010-12-28 08:45:15 +0300 |
commit | 71da1e96d174fe23da58af3119ccc7c653357585 (patch) | |
tree | 77b398687fdc61a72867bfcf1884934ec047f284 /source/blender/editors/space_graph | |
parent | 24ae6f8c91f598581b6f0cd7cc49182e7dcf3959 (diff) |
Drivers Code Cleanups and UI Tweaks:
- Adding drivers from the UI (not from py-scripts though) will now
automatically add a "Transform Channel" driver variable to the newly
created drivers. This makes setting up drivers a bit more convenient
for the most commonly used case.
- Drivers now report their errors using the Reports system instead of
writing these directly to the console.
- Clarified some comments to be more insightful about the "why's" of
some design decisions, and related formatting/cleanup tweaks
- Reduced scope of "path" vars to just the scope they're required in
- Removed some unused defines from a failed experiment in the original
Keying Sets code ("templates" and "template flags") which was
superseeded by the more flexible + nicer "Builtin KeyingSets"
Diffstat (limited to 'source/blender/editors/space_graph')
-rw-r--r-- | source/blender/editors/space_graph/graph_buttons.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/editors/space_graph/graph_buttons.c b/source/blender/editors/space_graph/graph_buttons.c index 3274e654c15..21c269633f6 100644 --- a/source/blender/editors/space_graph/graph_buttons.c +++ b/source/blender/editors/space_graph/graph_buttons.c @@ -310,18 +310,19 @@ static void do_graph_region_driver_buttons(bContext *C, void *UNUSED(arg), int e } /* callback to remove the active driver */ -static void driver_remove_cb (bContext *UNUSED(C), void *ale_v, void *UNUSED(arg)) +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(id, fcu->rna_path, fcu->array_index, 0); + ANIM_remove_driver(reports, id, fcu->rna_path, fcu->array_index, 0); } /* callback to add a target variable to the active driver */ |