Blender V5.0
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").field_source();
14 b.add_output<decl::Bool>("Exists").field_source();
15}
16
18{
20 return;
21 }
22 params.set_output("Face Set", bke::AttributeFieldInput::from<int>(".sculpt_face_set"));
23 params.set_output("Exists", bke::AttributeExistsFieldInput::from(".sculpt_face_set"));
24}
25
26static void node_register()
27{
28 static blender::bke::bNodeType ntype;
29 geo_node_type_base(&ntype, "GeometryNodeToolFaceSet", GEO_NODE_TOOL_FACE_SET);
30 ntype.ui_name = "Face Set";
31 ntype.ui_description = "Each face's sculpt face set value";
32 ntype.enum_name_legacy = "TOOL_FACE_SET";
34 ntype.declare = node_declare;
38}
40
41} // namespace blender::nodes::node_geo_tool_face_set_cc
#define NODE_CLASS_INPUT
Definition BKE_node.hh:447
#define GEO_NODE_TOOL_FACE_SET
#define NOD_REGISTER_NODE(REGISTER_FUNC)
static fn::Field< bool > from(std::string name)
static fn::GField from(std::string name, const CPPType &type, std::optional< std::string > socket_inspection_name=std::nullopt)
uiWidgetBaseParameters params[MAX_WIDGET_BASE_BATCH]
void node_register_type(bNodeType &ntype)
Definition node.cc:2416
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(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
NodeGatherSocketLinkOperationsFunction gather_link_search_ops
Definition BKE_node.hh:378
NodeDeclareFunction declare
Definition BKE_node.hh:362