Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_clip/clip_dopesheet_draw.c
| Show First 20 Lines • Show All 105 Lines • ▼ Show 20 Lines | if (clip) { | ||||
| MovieTrackingDopesheetChannel *channel; | MovieTrackingDopesheetChannel *channel; | ||||
| float strip[4], selected_strip[4]; | float strip[4], selected_strip[4]; | ||||
| float height = (dopesheet->tot_channel * CHANNEL_STEP) + CHANNEL_HEIGHT; | float height = (dopesheet->tot_channel * CHANNEL_STEP) + CHANNEL_HEIGHT; | ||||
| uint keyframe_len = 0; | uint keyframe_len = 0; | ||||
| GPUVertFormat *format = immVertexFormat(); | GPUVertFormat *format = immVertexFormat(); | ||||
| uint pos_id = GPU_vertformat_attr_add(format, "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT); | uint pos_id = GPU_vertformat_attr_add(format, "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT); | ||||
| immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR); | immBindBuiltinProgram(GPU_SHADER_3D_UNIFORM_COLOR); | ||||
| /* don't use totrect set, as the width stays the same | /* don't use totrect set, as the width stays the same | ||||
| * (NOTE: this is ok here, the configuration is pretty straightforward) | * (NOTE: this is ok here, the configuration is pretty straightforward) | ||||
| */ | */ | ||||
| v2d->tot.ymin = (float)(-height); | v2d->tot.ymin = (float)(-height); | ||||
| float y = (float)CHANNEL_FIRST; | float y = (float)CHANNEL_FIRST; | ||||
| ▲ Show 20 Lines • Show All 185 Lines • ▼ Show 20 Lines | void clip_draw_dopesheet_channels(const bContext *C, ARegion *region) | ||||
| /* loop through channels, and set up drawing depending on their type | /* loop through channels, and set up drawing depending on their type | ||||
| * first pass: just the standard GL-drawing for backdrop + text | * first pass: just the standard GL-drawing for backdrop + text | ||||
| */ | */ | ||||
| float y = (float)CHANNEL_FIRST; | float y = (float)CHANNEL_FIRST; | ||||
| 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_3D_UNIFORM_COLOR); | ||||
| MovieTrackingDopesheetChannel *channel; | MovieTrackingDopesheetChannel *channel; | ||||
| for (channel = dopesheet->channels.first; channel; channel = channel->next) { | for (channel = dopesheet->channels.first; channel; channel = channel->next) { | ||||
| float yminc = (float)(y - CHANNEL_HEIGHT_HALF); | float yminc = (float)(y - CHANNEL_HEIGHT_HALF); | ||||
| float ymaxc = (float)(y + CHANNEL_HEIGHT_HALF); | float ymaxc = (float)(y + CHANNEL_HEIGHT_HALF); | ||||
| /* check if visible */ | /* check if visible */ | ||||
| if (IN_RANGE(yminc, v2d->cur.ymin, v2d->cur.ymax) || | if (IN_RANGE(yminc, v2d->cur.ymin, v2d->cur.ymax) || | ||||
| ▲ Show 20 Lines • Show All 94 Lines • Show Last 20 Lines | |||||