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.
This commit is contained in:
Joshua Leung
2008-04-29 03:19:11 +00:00
parent 484a00a817
commit cc22fddec8

View File

@@ -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();