Compositor: remove viewer cross hair setting Tiled priority #122639

Merged
Habib Gahbiche merged 2 commits from zazizizou/blender:com-rm-tiled-center into main 2024-06-04 21:15:30 +02:00

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( static void node_composit_backdrop_boxmask(
SpaceNode *snode, ImBuf *backdrop, bNode *node, int x, int y) 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 = node_composit_buts_cryptomatte_legacy;
ntype->draw_buttons_ex = node_composit_buts_cryptomatte_legacy_ex; ntype->draw_buttons_ex = node_composit_buts_cryptomatte_legacy_ex;
break; break;
case CMP_NODE_VIEWER:
ntype->draw_backdrop = node_composit_backdrop_viewer;
break;
} }
} }