From 4e845e06704bad3c11297ae8e86b400ef80b2a89 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 30 Jul 2016 16:34:01 +1000 Subject: Py-Driver: add 'self' option Drivers can use this to refer to the data which the driver is applied to, useful for objects, bones, to avoid having to create a variable pointing to its self. --- source/blender/editors/space_graph/graph_buttons.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source/blender/editors/space_graph/graph_buttons.c') diff --git a/source/blender/editors/space_graph/graph_buttons.c b/source/blender/editors/space_graph/graph_buttons.c index a9ab1502e16..4cbf04f9d42 100644 --- a/source/blender/editors/space_graph/graph_buttons.c +++ b/source/blender/editors/space_graph/graph_buttons.c @@ -812,6 +812,11 @@ static void graph_panel_drivers(const bContext *C, Panel *pa) } col = uiLayoutColumn(pa->layout, true); + + if (driver->type == DRIVER_TYPE_PYTHON) { + uiItemR(col, &driver_ptr, "use_self", 0, NULL, ICON_NONE); + } + /* debug setting */ uiItemR(col, &driver_ptr, "show_debug_info", 0, NULL, ICON_NONE); -- cgit v1.2.3