From 97a82102d4d24a94d8360a6f5f054e44f6fb1993 Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Mon, 29 Dec 2008 01:19:25 +0000 Subject: 2.5 - Action Editor / Animation Stuff: * Brought back clean (OKEY), sample (Shift-OKEY), and delete (XKEY/DELKEY) tools for the Action Editor. Currently clean uses a predefined threshold (as a rna-prop, though it's still lacking the popup to set this when it is called) * Added new file for 'destructive' keyframe operations/tools. * Got keyframing.c compiling. Now, some of these tools need to be operatorised. Also, the API there might change when enough of the system is stable for RNA-IPO work to take place (so that it can be tested). --- source/blender/blenkernel/BKE_action.h | 1 + source/blender/blenkernel/intern/action.c | 11 +++++++++++ 2 files changed, 12 insertions(+) (limited to 'source/blender/blenkernel') diff --git a/source/blender/blenkernel/BKE_action.h b/source/blender/blenkernel/BKE_action.h index a0c8be7d7f8..574d4154e86 100644 --- a/source/blender/blenkernel/BKE_action.h +++ b/source/blender/blenkernel/BKE_action.h @@ -51,6 +51,7 @@ struct ID; extern "C" { #endif +struct bAction *add_empty_action(const char name[]); /** * Removes and deallocates all channels from a pose. diff --git a/source/blender/blenkernel/intern/action.c b/source/blender/blenkernel/intern/action.c index beef3e1ef1d..f2a92b9024f 100644 --- a/source/blender/blenkernel/intern/action.c +++ b/source/blender/blenkernel/intern/action.c @@ -81,6 +81,17 @@ /* ***************** Library data level operations on action ************** */ +bAction *add_empty_action(const char name[]) +{ + bAction *act; + + act= alloc_libblock(&G.main->action, ID_AC, name); + act->id.flag |= LIB_FAKEUSER; + act->id.us++; + + return act; +} + static void make_local_action_channels(bAction *act) { bActionChannel *chan; -- cgit v1.2.3