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-06-23 17:25:31 +0400
committerJoshua Leung <aligorith@gmail.com>2009-06-23 17:25:31 +0400
commitb4acd77526f32faab0c3d86436eef56096985c3d (patch)
tree9b0212ceb39f1299b5e49508ed40bffb1bbf5318 /source/blender/editors/space_action/action_draw.c
parentaa267976b86f90423204e11a30eec4e0def0f296 (diff)
NLA SoC: Big Commit - Restored NLA-Mapping Corrections
In TweakMode, the keyframes of the Active Action are now shown (and can be edited) in NLA-mapped time, with appropriate corrections applied when editing. This works in the DopeSheet and Graph Editors :) To do this, got rid of the old wrappers/API-methods, replacing them with new-style ones. A few methods previously (in this branch) used only for evaluation are now used for this purpose too. As the same code is used for editing + evaluation, this should now be much better to work with. I've only done a few brief tests now, but I think I might've muddled the invert-flags on one or two cases which I'll need to check out tomorrow. So, beware that there may be some weird and critical bugs for the next few days here... Also, added proper license headers to new NLA files. TODO: - testing + bugfixing due to this commit - show range of keyframes in NLA Editor active-action line
Diffstat (limited to 'source/blender/editors/space_action/action_draw.c')
-rw-r--r--source/blender/editors/space_action/action_draw.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/source/blender/editors/space_action/action_draw.c b/source/blender/editors/space_action/action_draw.c
index 6eae581aa40..61048598644 100644
--- a/source/blender/editors/space_action/action_draw.c
+++ b/source/blender/editors/space_action/action_draw.c
@@ -964,7 +964,7 @@ ActKeysInc *init_aki_data(bAnimContext *ac, bAnimListElem *ale)
return NULL;
/* if strip is mapped, store settings */
- aki.ob= ANIM_nla_mapping_get(ac, ale);
+ aki.adt= ANIM_nla_mapping_get(ac, ale);
if (ac->datatype == ANIMCONT_DOPESHEET)
aki.ads= (bDopeSheet *)ac->data;
@@ -985,7 +985,7 @@ void draw_channel_strips(bAnimContext *ac, SpaceAction *saction, ARegion *ar)
int filter;
View2D *v2d= &ar->v2d;
- Object *nob= NULL;
+ AnimData *adt= NULL;
gla2DDrawInfo *di;
rcti scr_rct;
@@ -1016,18 +1016,18 @@ void draw_channel_strips(bAnimContext *ac, SpaceAction *saction, ARegion *ar)
/* if in NLA there's a strip active, map the view */
if (ac->datatype == ANIMCONT_ACTION) {
- nob= ANIM_nla_mapping_get(ac, NULL);
+ adt= ANIM_nla_mapping_get(ac, NULL);
- if (nob)
- ANIM_nla_mapping_draw(di, nob, 0);
+ if (adt)
+ ANIM_nla_mapping_draw(di, adt, 0);
/* start and end of action itself */
calc_action_range(ac->data, &sta, &end, 0);
gla2DDrawTranslatePt(di, sta, 0.0f, &act_start, &dummy);
gla2DDrawTranslatePt(di, end, 0.0f, &act_end, &dummy);
- if (nob)
- ANIM_nla_mapping_draw(di, nob, 1);
+ if (adt)
+ ANIM_nla_mapping_draw(di, adt, 1);
}
/* build list of channels to draw */
@@ -1191,10 +1191,10 @@ void draw_channel_strips(bAnimContext *ac, SpaceAction *saction, ARegion *ar)
/* check if anything to show for this channel */
if (ale->datatype != ALE_NONE) {
ActKeysInc *aki= init_aki_data(ac, ale);
- nob= ANIM_nla_mapping_get(ac, ale);
+ adt= ANIM_nla_mapping_get(ac, ale);
- if (nob)
- ANIM_nla_mapping_draw(di, nob, 0);
+ if (adt)
+ ANIM_nla_mapping_draw(di, adt, 0);
/* draw 'keyframes' for each specific datatype */
switch (ale->datatype) {
@@ -1218,8 +1218,8 @@ void draw_channel_strips(bAnimContext *ac, SpaceAction *saction, ARegion *ar)
break;
}
- if (nob)
- ANIM_nla_mapping_draw(di, nob, 1);
+ if (adt)
+ ANIM_nla_mapping_draw(di, adt, 1);
}
}