Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/geometry/nodes/node_geo_input_curve_handles.cc
| /* SPDX-License-Identifier: GPL-2.0-or-later */ | /* SPDX-License-Identifier: GPL-2.0-or-later */ | ||||
| #include "BKE_curves.hh" | #include "BKE_curves.hh" | ||||
| #include "node_geometry_util.hh" | #include "node_geometry_util.hh" | ||||
| namespace blender::nodes::node_geo_input_curve_handles_cc { | namespace blender::nodes::node_geo_input_curve_handles_cc { | ||||
| static void node_declare(NodeDeclarationBuilder &b) | static void node_declare(NodeDeclarationBuilder &b) | ||||
| { | { | ||||
| b.add_input<decl::Bool>(N_("Relative")) | b.add_input<decl::Bool>(N_("Relative")) | ||||
| .default_value(false) | .default_value(false) | ||||
| .supports_field() | .supports_field() | ||||
| .description(N_("Output the handle positions relative to the corresponding control point " | .description(N_("Output the handle positions relative to the corresponding control point " | ||||
| "instead of in the local space of the geometry")); | "instead of in the local space of the geometry")); | ||||
| b.add_output<decl::Vector>(N_("Left")).field_source(); | b.add_output<decl::Vector>(N_("Left")).field_source_reference_all(); | ||||
| b.add_output<decl::Vector>(N_("Right")).field_source(); | b.add_output<decl::Vector>(N_("Right")).field_source_reference_all(); | ||||
| } | } | ||||
| class HandlePositionFieldInput final : public bke::CurvesFieldInput { | class HandlePositionFieldInput final : public bke::CurvesFieldInput { | ||||
| Field<bool> relative_; | Field<bool> relative_; | ||||
| bool left_; | bool left_; | ||||
| public: | public: | ||||
| HandlePositionFieldInput(Field<bool> relative, bool left) | HandlePositionFieldInput(Field<bool> relative, bool left) | ||||
| ▲ Show 20 Lines • Show All 92 Lines • Show Last 20 Lines | |||||