Blender V5.3
node_geo_input_named_layer_selection.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_input<decl::String>("Name"_ustr).is_layer_name().optional_label();
14 b.add_output<decl::Bool>("Selection"_ustr)
15 .structure_type(StructureType::Field)
16 .propagate_references();
17}
18
20{
21 std::string name = params.extract_input<std::string>("Name"_ustr);
22 if (name.empty()) {
24 return;
25 }
26 params.set_output("Selection"_ustr,
28}
29
30static void node_register()
31{
32 static bke::bNodeType ntype;
33
35 &ntype, "GeometryNodeInputNamedLayerSelection"_ustr, GEO_NODE_INPUT_NAMED_LAYER_SELECTION);
36 ntype.ui_name = "Named Layer Selection";
37 ntype.ui_description = "Output a selection of a Grease Pencil layer";
38 ntype.enum_name_legacy = "INPUT_NAMED_LAYER_SELECTION";
41 ntype.declare = node_declare;
44}
46
47} // namespace blender::nodes::node_geo_input_named_layer_selection__cc
#define NODE_CLASS_INPUT
Definition BKE_node.hh:478
#define GEO_NODE_INPUT_NAMED_LAYER_SELECTION
#define NOD_REGISTER_NODE(REGISTER_FUNC)
static Field from_input(Args &&...args)
T extract_input(const UString identifier)
void set_output(const UString identifier, T &&value)
void node_register_type(bNodeType &ntype)
Definition node.cc:2920
void geo_node_type_base(bke::bNodeType *ntype, UString idname, const std::optional< int16_t > legacy_type)
static constexpr int _160
Definition BKE_node.hh:246
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
NodeDeclareFunction declare
Definition BKE_node.hh:393