Compositor: remove viewer crosshair to set tile priority

The functionality has already been removed in https://projects.blender.org/blender/blender/pulls/121176. This patch removes the drawing in backdrop compositor.

Pull Request: https://projects.blender.org/blender/blender/pulls/122639
This commit is contained in:
Habib Gahbiche
2024-06-04 21:15:17 +02:00
parent 6521577e4a
commit ccdba13492

View File

@@ -613,35 +613,6 @@ static void node_composit_buts_combsep_color(uiLayout *layout, bContext * /*C*/,
}
}
static void node_composit_backdrop_viewer(
SpaceNode *snode, ImBuf *backdrop, bNode *node, int x, int y)
{
// node_composit_backdrop_canvas(snode, backdrop, node, x, y);
if (node->custom1 == 0) {
const float backdropWidth = backdrop->x;
const float backdropHeight = backdrop->y;
const float cx = x + snode->zoom * backdropWidth * node->custom3;
const float cy = y + snode->zoom * backdropHeight * node->custom4;
const float cross_size = 12 * U.pixelsize;
GPUVertFormat *format = immVertexFormat();
uint pos = GPU_vertformat_attr_add(format, "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT);
immBindBuiltinProgram(GPU_SHADER_3D_UNIFORM_COLOR);
immUniformColor3f(1.0f, 1.0f, 1.0f);
immBegin(GPU_PRIM_LINES, 4);
immVertex2f(pos, cx - cross_size, cy - cross_size);
immVertex2f(pos, cx + cross_size, cy + cross_size);
immVertex2f(pos, cx + cross_size, cy - cross_size);
immVertex2f(pos, cx - cross_size, cy + cross_size);
immEnd();
immUnbindProgram();
}
}
static void node_composit_backdrop_boxmask(
SpaceNode *snode, ImBuf *backdrop, bNode *node, int x, int y)
{
@@ -865,9 +836,6 @@ static void node_composit_set_butfunc(blender::bke::bNodeType *ntype)
ntype->draw_buttons = node_composit_buts_cryptomatte_legacy;
ntype->draw_buttons_ex = node_composit_buts_cryptomatte_legacy_ex;
break;
case CMP_NODE_VIEWER:
ntype->draw_backdrop = node_composit_backdrop_viewer;
break;
}
}