Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_nla/nla_draw.c
| Show First 20 Lines • Show All 738 Lines • ▼ Show 20 Lines | if (IN_RANGE(ymin, v2d->cur.ymin, v2d->cur.ymax) || | ||||
| NlaTrack *nlt = (NlaTrack *)ale->data; | NlaTrack *nlt = (NlaTrack *)ale->data; | ||||
| NlaStrip *strip; | NlaStrip *strip; | ||||
| int index; | int index; | ||||
| /* draw each strip in the track (if visible) */ | /* draw each strip in the track (if visible) */ | ||||
| for (strip = nlt->strips.first, index = 1; strip; strip = strip->next, index++) { | for (strip = nlt->strips.first, index = 1; strip; strip = strip->next, index++) { | ||||
| if (BKE_nlastrip_within_bounds(strip, v2d->cur.xmin, v2d->cur.xmax)) { | if (BKE_nlastrip_within_bounds(strip, v2d->cur.xmin, v2d->cur.xmax)) { | ||||
| const float xminc = strip->start + text_margin_x; | const float xminc = strip->start + text_margin_x; | ||||
| const float xmaxc = strip->end + text_margin_x; | const float xmaxc = strip->end - text_margin_x; | ||||
| /* draw the visualization of the strip */ | /* draw the visualization of the strip */ | ||||
| nla_draw_strip(snla, adt, nlt, strip, v2d, ymin, ymax); | nla_draw_strip(snla, adt, nlt, strip, v2d, ymin, ymax); | ||||
| /* add the text for this strip to the cache */ | /* add the text for this strip to the cache */ | ||||
| if (xminc < xmaxc) { | if (xminc < xmaxc) { | ||||
| nla_draw_strip_text(adt, nlt, strip, index, v2d, xminc, xmaxc, ymin, ymax); | nla_draw_strip_text(adt, nlt, strip, index, v2d, xminc, xmaxc, ymin, ymax); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 137 Lines • Show Last 20 Lines | |||||