Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_action/action_draw.c
| Show First 20 Lines • Show All 200 Lines • ▼ Show 20 Lines | void draw_channel_strips(bAnimContext *ac, SpaceAction *saction, ARegion *region) | ||||
| if (ac->datatype == ANIMCONT_DOPESHEET) { | if (ac->datatype == ANIMCONT_DOPESHEET) { | ||||
| draw_channel_action_ranges(ac, &anim_data, v2d); | draw_channel_action_ranges(ac, &anim_data, v2d); | ||||
| } | } | ||||
| /* Draw the background strips. */ | /* Draw the background strips. */ | ||||
| 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); | ||||
| GPU_blend(GPU_BLEND_ALPHA); | GPU_blend(GPU_BLEND_ALPHA); | ||||
| /* first backdrop strips */ | /* first backdrop strips */ | ||||
| float ymax = ACHANNEL_FIRST_TOP(ac); | float ymax = ACHANNEL_FIRST_TOP(ac); | ||||
| for (ale = anim_data.first; ale; ale = ale->next, ymax -= ACHANNEL_STEP(ac)) { | for (ale = anim_data.first; ale; ale = ale->next, ymax -= ACHANNEL_STEP(ac)) { | ||||
| float ymin = ymax - ACHANNEL_HEIGHT(ac); | float ymin = ymax - ACHANNEL_HEIGHT(ac); | ||||
| ▲ Show 20 Lines • Show All 394 Lines • ▼ Show 20 Lines | if ((saction->cache_display & TIME_CACHE_DISPLAY) == 0 || ob == NULL) { | ||||
| return; | return; | ||||
| } | } | ||||
| ListBase pidlist; | ListBase pidlist; | ||||
| BKE_ptcache_ids_from_object(&pidlist, ob, scene, 0); | BKE_ptcache_ids_from_object(&pidlist, ob, scene, 0); | ||||
| uint pos_id = GPU_vertformat_attr_add( | uint pos_id = GPU_vertformat_attr_add( | ||||
| immVertexFormat(), "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT); | immVertexFormat(), "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT); | ||||
| immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR); | immBindBuiltinProgram(GPU_SHADER_3D_UNIFORM_COLOR); | ||||
| GPU_blend(GPU_BLEND_ALPHA); | GPU_blend(GPU_BLEND_ALPHA); | ||||
| /* Iterate over pointcaches on the active object, and draw each one's range. */ | /* Iterate over pointcaches on the active object, and draw each one's range. */ | ||||
| float y_offset = 0.0f; | float y_offset = 0.0f; | ||||
| const float cache_draw_height = 4.0f * UI_DPI_FAC * U.pixelsize; | const float cache_draw_height = 4.0f * UI_DPI_FAC * U.pixelsize; | ||||
| LISTBASE_FOREACH (PTCacheID *, pid, &pidlist) { | LISTBASE_FOREACH (PTCacheID *, pid, &pidlist) { | ||||
| if (timeline_cache_is_hidden_by_setting(saction, pid)) { | if (timeline_cache_is_hidden_by_setting(saction, pid)) { | ||||
| Show All 19 Lines | |||||