Esempio n. 1
0
/* Markers inside a NLA-Strip */
static void nla_strip_draw_markers(NlaStrip *strip, float yminc, float ymaxc)
{
	glLineWidth(2.0);
	
	if (strip->type == NLASTRIP_TYPE_CLIP) {
		/* try not to be too conspicuous, while being visible enough when transforming */
		if (strip->flag & NLASTRIP_FLAG_SELECT)
			UI_ThemeColorShade(TH_STRIP_SELECT, -60);
		else
			UI_ThemeColorShade(TH_STRIP_SELECT, -40);
		
		setlinestyle(3);
		
		/* just draw the markers in this clip */
		nla_actionclip_draw_markers(strip, yminc, ymaxc);
		
		setlinestyle(0);
	}
	else if (strip->flag & NLASTRIP_FLAG_TEMP_META) {
		/* just a solid color, so that it is very easy to spot */
		UI_ThemeColorShade(TH_STRIP_SELECT, 20);
		
		/* draw the markers in the first level of strips only (if they are actions) */
		for (NlaStrip *nls = strip->strips.first; nls; nls = nls->next) {
			if (nls->type == NLASTRIP_TYPE_CLIP) {
				nla_actionclip_draw_markers(nls, yminc, ymaxc);
			}
		}
	}
	
	glLineWidth(1.0);
}
Esempio n. 2
0
/* Markers inside a NLA-Strip */
static void nla_strip_draw_markers(NlaStrip *strip, float yminc, float ymaxc)
{
  GPU_line_width(2.0f);

  if (strip->type == NLASTRIP_TYPE_CLIP) {
    /* try not to be too conspicuous, while being visible enough when transforming */
    int shade = (strip->flag & NLASTRIP_FLAG_SELECT) ? -60 : -40;

    /* just draw the markers in this clip */
    nla_actionclip_draw_markers(strip, yminc, ymaxc, shade, true);
  }
  else if (strip->flag & NLASTRIP_FLAG_TEMP_META) {
    /* just a solid color, so that it is very easy to spot */
    int shade = 20;
    /* draw the markers in the first level of strips only (if they are actions) */
    for (NlaStrip *nls = strip->strips.first; nls; nls = nls->next) {
      if (nls->type == NLASTRIP_TYPE_CLIP) {
        nla_actionclip_draw_markers(nls, yminc, ymaxc, shade, false);
      }
    }
  }

  GPU_line_width(1.0f);
}