Blender V5.0
node_geo_input_edge_smooth.cc
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
6
8
10{
11 b.add_output<decl::Bool>("Smooth").field_source().translation_context(BLT_I18NCONTEXT_ID_MESH);
12}
13
15{
16 Field<bool> sharp = AttributeFieldInput::from<bool>("sharp_edge");
17 params.set_output("Smooth", fn::invert_boolean_field(std::move(sharp)));
18}
19
20static void node_register()
21{
22 static blender::bke::bNodeType ntype;
23
24 geo_node_type_base(&ntype, "GeometryNodeInputEdgeSmooth", GEO_NODE_INPUT_EDGE_SMOOTH);
25 ntype.ui_name = "Is Edge Smooth";
26 ntype.ui_description = "Retrieve whether each edge is marked for smooth or split normals";
27 ntype.enum_name_legacy = "INPUT_EDGE_SMOOTH";
30 ntype.declare = node_declare;
32}
34
35} // namespace blender::nodes::node_geo_input_edge_smooth_cc
#define NODE_CLASS_INPUT
Definition BKE_node.hh:447
#define GEO_NODE_INPUT_EDGE_SMOOTH
#define BLT_I18NCONTEXT_ID_MESH
#define NOD_REGISTER_NODE(REGISTER_FUNC)
static fn::GField from(std::string name, const CPPType &type, std::optional< std::string > socket_inspection_name=std::nullopt)
std::optional< std::string > translation_context
uiWidgetBaseParameters params[MAX_WIDGET_BASE_BATCH]
void node_register_type(bNodeType &ntype)
Definition node.cc:2416
Field< bool > invert_boolean_field(const Field< bool > &field)
Definition field.cc:520
static void node_declare(NodeDeclarationBuilder &b)
static void node_geo_exec(GeoNodeExecParams params)
void geo_node_type_base(blender::bke::bNodeType *ntype, std::string idname, const std::optional< int16_t > legacy_type)
Defines a node type.
Definition BKE_node.hh:238
std::string ui_description
Definition BKE_node.hh:244
NodeGeometryExecFunction geometry_node_execute
Definition BKE_node.hh:354
const char * enum_name_legacy
Definition BKE_node.hh:247
NodeDeclareFunction declare
Definition BKE_node.hh:362