From 87365d8d407d5cfddcfa48f1dc3902f7f1a3fa5b Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Mon, 10 Oct 2005 17:42:48 +0000 Subject: Stage two of the giant animation recode project; Ipo/Action/NLA cleanup -> Note; added 2 new c files (split editipo.c). MSVC needs upgrade. Impatient people can check the goodies in CMS: http://www.blender3d.org/cms/Action_and_NLA_editor.706.0.html Most work was on trying to unwind the spaghetti for editing ipos. Too much history and bad design got added here. Most evident changes: - made generic 'context' for detecting which Ipo is being edited, or to assign ipos or to retrieve ipo curves. - made generic insertkey() for all ipo types, including actions - shuffled a lot of code around to make things more logical. Also made sure local functions are not exported It is far from ready... when action/nla was added in Blender, a lot of duplicate code was generated. That's for another time. Now the goodies; - made Actions to allow any Ipo type - made NLA to define active actions, for Action window too - corrected timing for active action, so it shows the 'real time', as defined in NLA editor. I did update python code, but that would require testing. Testing is needed for this commit in general, too many changes happened on all levels of the animation system. :) Will keep track of all reports this evening, hopefully it doesnt break the pre-release schedule! --- source/blender/src/header_action.c | 40 ++++++++++++++++---------------------- 1 file changed, 17 insertions(+), 23 deletions(-) (limited to 'source/blender/src/header_action.c') diff --git a/source/blender/src/header_action.c b/source/blender/src/header_action.c index 216309ceb94..49f5ee3fd0d 100644 --- a/source/blender/src/header_action.c +++ b/source/blender/src/header_action.c @@ -395,7 +395,7 @@ static void do_action_keymenu_transformmenu(void *arg, int event) transform_meshchannel_keys('g', key); } else if (act) { - transform_actionchannel_keys ('g'); + transform_actionchannel_keys ('g', 0); } break; case ACTMENU_KEY_TRANSFORM_SCALE: @@ -403,7 +403,7 @@ static void do_action_keymenu_transformmenu(void *arg, int event) transform_meshchannel_keys('s', key); } else if (act) { - transform_actionchannel_keys ('s'); + transform_actionchannel_keys ('s', 0); } break; } @@ -743,30 +743,24 @@ void action_buttons(void) uiBlockSetEmboss(block, UI_EMBOSS); - // object action is allowed to be zero! - /* (ton) commented out below line, since people can apparently link Action to any object (mesh) and - not unlink anymore when theres a mesh key. Needs to be rethought this stuff! */ - //if (!get_action_mesh_key()) { - - /* NAME ETC */ - ob=OBACT; - from = (ID*) ob; + /* NAME ETC */ + ob=OBACT; + from = (ID*) ob; - xco= std_libbuttons(block, xco, 0, B_ACTPIN, &G.saction->pin, - B_ACTIONBROWSE, (ID*)G.saction->action, - from, &(G.saction->actnr), B_ACTALONE, - B_ACTLOCAL, B_ACTIONDELETE, 0, 0); + xco= std_libbuttons(block, xco, 0, B_ACTPIN, &G.saction->pin, + B_ACTIONBROWSE, (ID*)G.saction->action, + from, &(G.saction->actnr), B_ACTALONE, + B_ACTLOCAL, B_ACTIONDELETE, 0, 0); - /* Draw action baker */ - xco+= 8; - - uiDefBut(block, BUT, B_ACTBAKE, - "Bake", xco, 0, 64, YIC, 0, 0, 0, 0, 0, - "Create an action with the constraint effects " - "converted into Ipo keys"); - xco+=64; + /* Draw action baker */ + xco+= 8; + + uiDefBut(block, BUT, B_ACTBAKE, + "Bake", xco, 0, 64, YIC, 0, 0, 0, 0, 0, + "Create an action with the constraint effects " + "converted into Ipo keys"); + xco+=64; - //} uiClearButLock(); /* draw LOCK */ -- cgit v1.2.3