Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Leung <aligorith@gmail.com>2009-08-25 08:32:40 +0400
committerJoshua Leung <aligorith@gmail.com>2009-08-25 08:32:40 +0400
commit33343fced5d7be2585228300392bfb3adde7ff2e (patch)
tree3873803e72eb9888b562971ff94506ea7b9d3cff /source/blender/editors/space_action
parente80ac54a22214a8ecc499aa70f59bb61fcba4fa3 (diff)
2.5 - Action Editor
New Actions can now be added again from the Action Editor. There are no guarantees that this works totally safely yet (reference counting may be quite off), so you've been warned.
Diffstat (limited to 'source/blender/editors/space_action')
-rw-r--r--source/blender/editors/space_action/action_header.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/source/blender/editors/space_action/action_header.c b/source/blender/editors/space_action/action_header.c
index 33a97b5a80a..e2a725164c9 100644
--- a/source/blender/editors/space_action/action_header.c
+++ b/source/blender/editors/space_action/action_header.c
@@ -43,6 +43,7 @@
#include "BLI_blenlib.h"
#include "BKE_animsys.h"
+#include "BKE_action.h"
#include "BKE_context.h"
#include "BKE_screen.h"
@@ -272,6 +273,7 @@ static void saction_idpoin_handle(bContext *C, ID *id, int event)
/* set action */
printf("\tset action \n");
adt->action= saction->action;
+ adt->action->id.us++;
}
ED_area_tag_redraw(CTX_wm_area(C));
@@ -282,7 +284,14 @@ static void saction_idpoin_handle(bContext *C, ID *id, int event)
break;
case UI_ID_ADD_NEW:
printf("actedit addnew \n");
- /* XXX not implemented */
+ if (saction->pin == 0) {
+ AnimData *adt= BKE_id_add_animdata(&obact->id); /* this only adds if non-existant */
+
+ /* set new action */
+ // XXX need to restore behaviour to copy old actions...
+ printf("\tset new action \n");
+ adt->action= saction->action= add_empty_action("Action");
+ }
break;
case UI_ID_OPEN:
printf("actedit open \n");