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-20 08:02:49 +0400
committerJoshua Leung <aligorith@gmail.com>2009-06-20 08:02:49 +0400
commit6394ee9e8143988b2a0f9316fb7bca5dc78e6e53 (patch)
treeac6a3c209f6b8b7eca45742b2cf4b8ba0a0f38f7 /source/blender/editors/space_nla/nla_draw.c
parent6393e9b3ca7e40e95830d009020b0f106c00b529 (diff)
NLA SoC: Drawing + Editing Fixes
* Strips using the same action as the 'tweaking action' now get the error flag cleared after tweakmode is exited. (These strips draw with red shading) * The direction in which strips get played (as a result of the 'reversed' option) now gets indicated on strips by the direction of the arrow text printed on each strip * The active strip flag is now cleared after duplicating/splitting strips.
Diffstat (limited to 'source/blender/editors/space_nla/nla_draw.c')
-rw-r--r--source/blender/editors/space_nla/nla_draw.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/source/blender/editors/space_nla/nla_draw.c b/source/blender/editors/space_nla/nla_draw.c
index 9a9cbeeff21..2ac2b557243 100644
--- a/source/blender/editors/space_nla/nla_draw.c
+++ b/source/blender/editors/space_nla/nla_draw.c
@@ -212,19 +212,25 @@ static void nla_draw_strip (AnimData *adt, NlaTrack *nlt, NlaStrip *strip, View2
/* add the relevant text to the cache of text-strings to draw in pixelspace */
static void nla_draw_strip_text (NlaTrack *nlt, NlaStrip *strip, int index, View2D *v2d, float yminc, float ymaxc)
{
- char str[256];
+ char str[256], dir[3];
rctf rect;
+ /* 'dir' - direction that strip is played in */
+ if (strip->flag & NLASTRIP_FLAG_REVERSE)
+ sprintf(dir, "<-");
+ else
+ sprintf(dir, "->");
+
/* for now, just init the string with fixed-formats */
switch (strip->type) {
case NLASTRIP_TYPE_TRANSITION: /* Transition */
- sprintf(str, "%d | Transition | %.2f <-> %.2f", index, strip->start, strip->end);
+ sprintf(str, "%d | Transition | %.2f %s %.2f", index, strip->start, dir, strip->end);
break;
case NLASTRIP_TYPE_CLIP: /* Action-Clip (default) */
default:
if (strip->act)
- sprintf(str, "%d | Act: %s | %.2f <-> %.2f", index, strip->act->id.name+2, strip->start, strip->end);
+ sprintf(str, "%d | Act: %s | %.2f %s %.2f", index, strip->act->id.name+2, strip->start, dir, strip->end);
else
sprintf(str, "%d | Act: <NONE>", index); // xxx... need a better format?
break;