Blender V5.3
node_geo_grease_pencil_opacity.cc
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2026 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
6
8
10
12{
13 b.add_output<decl::Float>("Point"_ustr).structure_type(StructureType::Field);
14 b.add_output<decl::Float>("Fill"_ustr).structure_type(StructureType::Field);
15}
16
18{
19 Field<float> point_opacity = AttributeFieldInput::get_field<float, "opacity">();
20 params.set_output("Point"_ustr, std::move(point_opacity));
21
22 Field<float> fill_opacity = AttributeFieldInput::get_field<float, "fill_opacity">();
23 params.set_output("Fill"_ustr, std::move(fill_opacity));
24}
25
26static void node_register()
27{
28 static bke::bNodeType ntype;
29
30 geo_node_type_base(&ntype, "GeometryNodeGreasePencilOpacity"_ustr);
31 ntype.ui_name = "Grease Pencil Opacity";
32 ntype.ui_description = "Retrieve the opacity of Grease Pencil points and fills";
35 ntype.declare = node_declare;
38}
40
41} // namespace blender::nodes::node_geo_grease_pencil_opacity__cc
#define NODE_CLASS_INPUT
Definition BKE_node.hh:478
#define NOD_REGISTER_NODE(REGISTER_FUNC)
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
void geo_node_type_base(bke::bNodeType *ntype, UString idname, const std::optional< int16_t > legacy_type)
KERNEL_FEATURE_LIGHT_PASSES KERNEL_FEATURE_PATH_GUIDING float
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
NodeDeclareFunction declare
Definition BKE_node.hh:393