24 const int quad_method,
25 const int ngon_method,
26 const int min_vertices,
32 {
SOCK_INT,
N_(
"Minimum Vertices"), 4, 0, 0, 0, 4, 10000},
43 uiItemR(layout,
ptr,
"quad_method", 0,
"", ICON_NONE);
44 uiItemR(layout,
ptr,
"ngon_method", 0,
"", ICON_NONE);
57 const int min_vertices =
std::max(
params.extract_input<
int>(
"Minimum Vertices"), 4);
68 if (mesh_in !=
nullptr) {
73 params.set_output(
"Geometry", std::move(geometry_set));
#define GEO_NODE_TRIANGULATE
void node_type_socket_templates(struct bNodeType *ntype, struct bNodeSocketTemplate *inputs, struct bNodeSocketTemplate *outputs)
void node_type_init(struct bNodeType *ntype, void(*initfunc)(struct bNodeTree *ntree, struct bNode *node))
#define NODE_CLASS_GEOMETRY
void nodeRegisterType(struct bNodeType *ntype)
GeometryNodeTriangulateQuads
@ GEO_NODE_TRIANGULATE_QUAD_SHORTEDGE
GeometryNodeTriangulateNGons
@ GEO_NODE_TRIANGULATE_NGON_BEAUTY
void uiItemR(uiLayout *layout, struct PointerRNA *ptr, const char *propname, int flag, const char *name, int icon)
GeometrySet geometry_set_realize_instances(const GeometrySet &geometry_set)
static void geo_node_triangulate_exec(GeoNodeExecParams params)
static bNodeSocketTemplate geo_node_triangulate_out[]
static void geo_triangulate_init(bNodeTree *UNUSED(ntree), bNode *node)
static bNodeSocketTemplate geo_node_triangulate_in[]
void register_node_type_geo_triangulate()
Mesh * triangulate_mesh(Mesh *mesh, const int quad_method, const int ngon_method, const int min_vertices, const int flag)
static void geo_node_triangulate_layout(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
void geo_node_type_base(bNodeType *ntype, int type, const char *name, short nclass, short flag)
void replace_mesh(Mesh *mesh, GeometryOwnershipType ownership=GeometryOwnershipType::Owned)
Mesh * get_mesh_for_write()
Compact definition of a node socket.
NodeGeometryExecFunction geometry_node_execute
void(* draw_buttons)(struct uiLayout *, struct bContext *C, struct PointerRNA *ptr)