Blender V5.3
node_geo_tool_face_set.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
12{
13 b.add_output<decl::Int>("Face Set"_ustr).structure_type(StructureType::Field);
14 b.add_output<decl::Bool>("Exists"_ustr).structure_type(StructureType::Field);
15}
16
18{
19 if (!check_tool_context_and_error(params)) {
20 return;
21 }
22 params.set_output("Face Set"_ustr,
24 params.set_output("Exists"_ustr, bke::AttributeExistsFieldInput::from(".sculpt_face_set"));
25}
26
27static void node_register()
28{
29 static bke::bNodeType ntype;
30 geo_node_type_base(&ntype, "GeometryNodeToolFaceSet"_ustr, GEO_NODE_TOOL_FACE_SET);
31 ntype.ui_name = "Face Set";
32 ntype.ui_description = "Each face's sculpt face set value";
33 ntype.enum_name_legacy = "TOOL_FACE_SET";
35 ntype.declare = node_declare;
39}
41
42} // namespace blender::nodes::node_geo_tool_face_set_cc
#define NODE_CLASS_INPUT
Definition BKE_node.hh:478
#define GEO_NODE_TOOL_FACE_SET
#define NOD_REGISTER_NODE(REGISTER_FUNC)
static fn::Field< bool > from(std::string name)
static const fn::Field< T > & get_field()
void set_output(const UString identifier, T &&value)
void node_register_type(bNodeType &ntype)
Definition node.cc:2920
static void node_declare(NodeDeclarationBuilder &b)
static void node_geo_exec(GeoNodeExecParams params)
void search_link_ops_for_tool_node(GatherLinkSearchOpParams &params)
bool check_tool_context_and_error(GeoNodeExecParams &params)
void geo_node_type_base(bke::bNodeType *ntype, UString idname, const std::optional< int16_t > legacy_type)
Defines a node type.
Definition BKE_node.hh:265
std::string ui_description
Definition BKE_node.hh:271
NodeGeometryExecFunction geometry_node_execute
Definition BKE_node.hh:385
const char * enum_name_legacy
Definition BKE_node.hh:274
NodeGatherSocketLinkOperationsFunction gather_link_search_ops
Definition BKE_node.hh:409
NodeDeclareFunction declare
Definition BKE_node.hh:393