From 2ba233a31fead52820763fb6637dcae20eeed574 Mon Sep 17 00:00:00 2001 From: Charlie Jolly Date: Thu, 22 Aug 2019 11:10:11 +0200 Subject: Nodes: Support for socket shapes other than circle Previously there was already "draw_shape" property, but it was doing nothing. This commit renames the property to "display_shape". Furthermore, different shapes like SQUARE and DIAMOND are supported now. Currently, the shapes are drawn using the shader that also draws keyframes. In the future we might want to separate this. The new shapes are not used anywhere yet, but they can be used by addon developers and will probably be useful when we want to support different kinds node systems later. For example, different shapes can be used to distinguish between data and control flow. Differential Revision: https://developer.blender.org/D2829 --- source/blender/editors/space_nla/nla_draw.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source/blender/editors/space_nla/nla_draw.c') diff --git a/source/blender/editors/space_nla/nla_draw.c b/source/blender/editors/space_nla/nla_draw.c index 5cf9646210e..9d6ccd6fe35 100644 --- a/source/blender/editors/space_nla/nla_draw.c +++ b/source/blender/editors/space_nla/nla_draw.c @@ -141,8 +141,10 @@ static void nla_action_draw_keyframes( uint outline_color_id = GPU_vertformat_attr_add( format, "outlineColor", GPU_COMP_U8, 4, GPU_FETCH_INT_TO_FLOAT_UNIT); uint flags_id = GPU_vertformat_attr_add(format, "flags", GPU_COMP_U32, 1, GPU_FETCH_INT); - immBindBuiltinProgram(GPU_SHADER_KEYFRAME_DIAMOND); + GPU_program_point_size(true); + immBindBuiltinProgram(GPU_SHADER_KEYFRAME_DIAMOND); + immUniform1f("outline_scale", 1.0f); immUniform2f("ViewportSize", BLI_rcti_size_x(&v2d->mask) + 1, BLI_rcti_size_y(&v2d->mask) + 1); immBegin(GPU_PRIM_POINTS, key_len); -- cgit v1.2.3