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-11 03:25:30 +0400
committerJoshua Leung <aligorith@gmail.com>2009-07-11 03:25:30 +0400
commit66a81a4062b8cc01452316c8eeb442b0acf2663e (patch)
tree3a0a40d65ad8cf39e6b9ea72042ef2d04ce8f60d /source/blender/editors/space_nla/nla_draw.c
parentb609f2aa790e122504aad34512d08241c2e01079 (diff)
NLA SoC: Names for NLA Strips
In order to be able to better identify NLA Strips (and to reduce the complexity of the text on them), I've implemented a name property for the strips. The names are made to be unique within the AnimData block the strip comes from, though this may not always happen if not enough relevant context info is present to validate this.
Diffstat (limited to 'source/blender/editors/space_nla/nla_draw.c')
-rw-r--r--source/blender/editors/space_nla/nla_draw.c25
1 files changed, 5 insertions, 20 deletions
diff --git a/source/blender/editors/space_nla/nla_draw.c b/source/blender/editors/space_nla/nla_draw.c
index 7fb15c62277..8d56670a149 100644
--- a/source/blender/editors/space_nla/nla_draw.c
+++ b/source/blender/editors/space_nla/nla_draw.c
@@ -445,26 +445,11 @@ static void nla_draw_strip_text (NlaTrack *nlt, NlaStrip *strip, int index, View
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 %s %.2f",
- index, strip->start, dir, strip->end);
- break;
-
- case NLASTRIP_TYPE_META: /* Meta */
- sprintf(str, "%d | %sMeta | %.2f %s %.2f",
- index, ((strip->flag & NLASTRIP_FLAG_TEMP_META)?"Temp-":""),
- strip->start, dir, strip->end);
- break;
-
- case NLASTRIP_TYPE_CLIP: /* Action-Clip (default) */
- default:
- sprintf(str, "%d | Act: %s | %.2f %s %.2f",
- index, ((strip->act)?strip->act->id.name+2:"<NONE>"),
- strip->start, dir, strip->end);
- break;
- }
+ /* just print the name and the range */
+ if (strip->flag & NLASTRIP_FLAG_TEMP_META)
+ sprintf(str, "Temp-Meta | %.2f %s %.2f", strip->start, dir, strip->end);
+ else
+ sprintf(str, "%s | %.2f %s %.2f", strip->name, strip->start, dir, strip->end);
/* set text colour - if colours (see above) are light, draw black text, otherwise draw white */
if (strip->flag & (NLASTRIP_FLAG_ACTIVE|NLASTRIP_FLAG_SELECT|NLASTRIP_FLAG_TWEAKUSER))