Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/geometry/nodes/node_geo_set_spline_cyclic.cc
| Show All 14 Lines | |||||
| */ | */ | ||||
| #include "node_geometry_util.hh" | #include "node_geometry_util.hh" | ||||
| namespace blender::nodes { | namespace blender::nodes { | ||||
| static void geo_node_set_spline_cyclic_declare(NodeDeclarationBuilder &b) | static void geo_node_set_spline_cyclic_declare(NodeDeclarationBuilder &b) | ||||
| { | { | ||||
| b.add_input<decl::Geometry>("Geometry").supported_type(GEO_COMPONENT_TYPE_CURVE); | b.add_input<decl::Geometry>(N_("Geometry")).supported_type(GEO_COMPONENT_TYPE_CURVE); | ||||
| b.add_input<decl::Bool>("Selection").default_value(true).hide_value().supports_field(); | b.add_input<decl::Bool>(N_("Selection")).default_value(true).hide_value().supports_field(); | ||||
| b.add_input<decl::Bool>("Cyclic").supports_field(); | b.add_input<decl::Bool>(N_("Cyclic")).supports_field(); | ||||
| b.add_output<decl::Geometry>("Geometry"); | b.add_output<decl::Geometry>(N_("Geometry")); | ||||
| } | } | ||||
| static void set_cyclic_in_component(GeometryComponent &component, | static void set_cyclic_in_component(GeometryComponent &component, | ||||
| const Field<bool> &selection_field, | const Field<bool> &selection_field, | ||||
| const Field<bool> &cyclic_field) | const Field<bool> &cyclic_field) | ||||
| { | { | ||||
| GeometryComponentFieldContext field_context{component, ATTR_DOMAIN_CURVE}; | GeometryComponentFieldContext field_context{component, ATTR_DOMAIN_CURVE}; | ||||
| const int domain_size = component.attribute_domain_size(ATTR_DOMAIN_CURVE); | const int domain_size = component.attribute_domain_size(ATTR_DOMAIN_CURVE); | ||||
| ▲ Show 20 Lines • Show All 45 Lines • Show Last 20 Lines | |||||