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-07-24 10:51:33 +0400
committerJoshua Leung <aligorith@gmail.com>2009-07-24 10:51:33 +0400
commitdbd5c5b8a13795a32f6d5bb1f4ae3c2b89058b47 (patch)
tree8df4a74a18f48cfc72c36f9d52bf8ac7b2809055 /source/blender/editors/space_nla/nla_edit.c
parent0f4fd4f5b17d4fff97cc3cde4cc7d144137154ca (diff)
2.5 - Animation Tweaks (KeyingSets/NLA)
* Insert Keyframes menu now only displays the 'active keyingset' entry when there are some KeyingSets. * Moved the validation code for auto-blending/extend modes to NLA editor code, and included calls for this in many of the editing tools for NLA strips. * Removed obsolete 'ID_IPO' entries from RNA-ID wrapping (these were commented out anyway).
Diffstat (limited to 'source/blender/editors/space_nla/nla_edit.c')
-rw-r--r--source/blender/editors/space_nla/nla_edit.c49
1 files changed, 49 insertions, 0 deletions
diff --git a/source/blender/editors/space_nla/nla_edit.c b/source/blender/editors/space_nla/nla_edit.c
index 01871d3d9d5..586b2467781 100644
--- a/source/blender/editors/space_nla/nla_edit.c
+++ b/source/blender/editors/space_nla/nla_edit.c
@@ -78,6 +78,28 @@
#include "nla_private.h" // FIXME... maybe this shouldn't be included?
/* *********************************************** */
+/* Utilities exported to other places... */
+
+/* Perform validation for blending/extend settings */
+void ED_nla_postop_refresh (bAnimContext *ac)
+{
+ ListBase anim_data = {NULL, NULL};
+ bAnimListElem *ale;
+ short filter= (ANIMFILTER_VISIBLE | ANIMFILTER_ANIMDATA | ANIMFILTER_FOREDIT);
+
+ /* get blocks to work on */
+ ANIM_animdata_filter(&ac, &anim_data, filter, ac->data, ac->datatype);
+
+ for (ale= anim_data.first; ale; ale= ale->next) {
+ /* performing auto-blending, extend-mode validation, etc. */
+ BKE_nla_validate_state(ale->data);
+ }
+
+ /* free temp memory */
+ BLI_freelistN(&anim_data);
+}
+
+/* *********************************************** */
/* 'Special' Editing */
/* ******************** Tweak-Mode Operators ***************************** */
@@ -315,6 +337,9 @@ static int nlaedit_add_actionclip_exec (bContext *C, wmOperator *op)
/* free temp data */
BLI_freelistN(&anim_data);
+ /* refresh auto strip properties */
+ ED_nla_postop_refresh(&ac);
+
/* set notifier that things have changed */
WM_event_add_notifier(C, NC_ANIMATION|ND_NLA_EDIT, NULL);
@@ -427,6 +452,9 @@ static int nlaedit_add_transition_exec (bContext *C, wmOperator *op)
/* was anything added? */
if (done) {
+ /* refresh auto strip properties */
+ ED_nla_postop_refresh(&ac);
+
/* set notifier that things have changed */
WM_event_add_notifier(C, NC_ANIMATION|ND_NLA_EDIT, NULL);
@@ -633,6 +661,9 @@ static int nlaedit_duplicate_exec (bContext *C, wmOperator *op)
BLI_freelistN(&anim_data);
if (done) {
+ /* refresh auto strip properties */
+ ED_nla_postop_refresh(&ac);
+
/* set notifier that things have changed */
WM_event_add_notifier(C, NC_ANIMATION|ND_NLA_EDIT, NULL);
@@ -718,6 +749,9 @@ static int nlaedit_delete_exec (bContext *C, wmOperator *op)
/* free temp data */
BLI_freelistN(&anim_data);
+ /* refresh auto strip properties */
+ ED_nla_postop_refresh(&ac);
+
/* set notifier that things have changed */
WM_event_add_notifier(C, NC_ANIMATION|ND_NLA_EDIT, NULL);
@@ -860,6 +894,9 @@ static int nlaedit_split_exec (bContext *C, wmOperator *op)
/* free temp data */
BLI_freelistN(&anim_data);
+ /* refresh auto strip properties */
+ ED_nla_postop_refresh(&ac);
+
/* set notifier that things have changed */
WM_event_add_notifier(C, NC_ANIMATION|ND_NLA_EDIT, NULL);
@@ -993,6 +1030,9 @@ static int nlaedit_move_up_exec (bContext *C, wmOperator *op)
/* free temp data */
BLI_freelistN(&anim_data);
+ /* refresh auto strip properties */
+ ED_nla_postop_refresh(&ac);
+
/* set notifier that things have changed */
WM_event_add_notifier(C, NC_ANIMATION|ND_NLA_EDIT, NULL);
@@ -1064,6 +1104,9 @@ static int nlaedit_move_down_exec (bContext *C, wmOperator *op)
/* free temp data */
BLI_freelistN(&anim_data);
+ /* refresh auto strip properties */
+ ED_nla_postop_refresh(&ac);
+
/* set notifier that things have changed */
WM_event_add_notifier(C, NC_ANIMATION|ND_NLA_EDIT, NULL);
@@ -1222,6 +1265,9 @@ static int nlaedit_clear_scale_exec (bContext *C, wmOperator *op)
/* free temp data */
BLI_freelistN(&anim_data);
+ /* refresh auto strip properties */
+ ED_nla_postop_refresh(&ac);
+
/* set notifier that things have changed */
WM_event_add_notifier(C, NC_ANIMATION|ND_NLA_EDIT, NULL);
@@ -1360,6 +1406,9 @@ static int nlaedit_snap_exec (bContext *C, wmOperator *op)
/* free temp data */
BLI_freelistN(&anim_data);
+ /* refresh auto strip properties */
+ ED_nla_postop_refresh(&ac);
+
/* set notifier that things have changed */
WM_event_add_notifier(C, NC_ANIMATION|ND_NLA_EDIT, NULL);