Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/animation/anim_draw.c
| Show First 20 Lines • Show All 135 Lines • ▼ Show 20 Lines | |||||
| { | { | ||||
| /* draw darkened area outside of active timeline frame range */ | /* draw darkened area outside of active timeline frame range */ | ||||
| GPU_blend(GPU_BLEND_ALPHA); | GPU_blend(GPU_BLEND_ALPHA); | ||||
| GPUVertFormat *format = immVertexFormat(); | GPUVertFormat *format = immVertexFormat(); | ||||
| uint pos = GPU_vertformat_attr_add(format, "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT); | uint pos = GPU_vertformat_attr_add(format, "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT); | ||||
| immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR); | immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR); | ||||
| immUniformThemeColorShadeAlpha(TH_BACK, -25, -100); | immUniformThemeColor(TH_TIME_RANGE); | ||||
| if (SFRA < EFRA) { | if (SFRA < EFRA) { | ||||
| immRectf(pos, v2d->cur.xmin, v2d->cur.ymin, (float)SFRA, v2d->cur.ymax); | immRectf(pos, v2d->cur.xmin, v2d->cur.ymin, (float)SFRA, v2d->cur.ymax); | ||||
| immRectf(pos, (float)EFRA, v2d->cur.ymin, v2d->cur.xmax, v2d->cur.ymax); | immRectf(pos, (float)EFRA, v2d->cur.ymin, v2d->cur.xmax, v2d->cur.ymax); | ||||
| } | } | ||||
| else { | else { | ||||
| immRectf(pos, v2d->cur.xmin, v2d->cur.ymin, v2d->cur.xmax, v2d->cur.ymax); | immRectf(pos, v2d->cur.xmin, v2d->cur.ymin, v2d->cur.xmax, v2d->cur.ymax); | ||||
| } | } | ||||
| GPU_blend(GPU_BLEND_NONE); | GPU_blend(GPU_BLEND_NONE); | ||||
| /* thin lines where the actual frames are */ | /* thin lines where the actual frames are */ | ||||
| immUniformThemeColorShade(TH_BACK, -60); | immUniformThemeColor3(TH_TIME_RANGE); | ||||
| immBegin(GPU_PRIM_LINES, 4); | immBegin(GPU_PRIM_LINES, 4); | ||||
| immVertex2f(pos, (float)SFRA, v2d->cur.ymin); | immVertex2f(pos, (float)SFRA, v2d->cur.ymin); | ||||
| immVertex2f(pos, (float)SFRA, v2d->cur.ymax); | immVertex2f(pos, (float)SFRA, v2d->cur.ymax); | ||||
| immVertex2f(pos, (float)EFRA, v2d->cur.ymin); | immVertex2f(pos, (float)EFRA, v2d->cur.ymin); | ||||
| immVertex2f(pos, (float)EFRA, v2d->cur.ymax); | immVertex2f(pos, (float)EFRA, v2d->cur.ymax); | ||||
| ▲ Show 20 Lines • Show All 464 Lines • Show Last 20 Lines | |||||