From cc22fddec8ba27ea1a952a84cc3ddb04ba69dba1 Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Tue, 29 Apr 2008 03:19:11 +0000 Subject: [PATCH] Bugfix #9676; Assigning Driver to Own Object when Pinning IPO Editor When the IPO Editor is pinned, drivers will now be handled as if they belonged to the object that the ipo-belonged to when the ipo was pinned. This behaviour is more predictable than using the active object. --- source/blender/src/drawipo.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/source/blender/src/drawipo.c b/source/blender/src/drawipo.c index 521e3ebd981..552e87a57d1 100644 --- a/source/blender/src/drawipo.c +++ b/source/blender/src/drawipo.c @@ -1851,11 +1851,17 @@ static void ipo_editvertex_buts(uiBlock *block, SpaceIpo *si, float min, float m void do_ipobuts(unsigned short event) { - Object *ob= OBACT; + Object *ob; EditIpo *ei; if(G.sipo->from==NULL) return; + /* use G.sipo->from (which should be an object) so that pinning ipo's will still work ok */ + if(GS(G.sipo->from->name) == ID_OB) + ob= (Object *)(G.sipo->from); + else + ob= OBACT; + switch(event) { case B_IPO_REDR: ei= get_active_editipo();