Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/geometry/nodes/node_geo_set_position.cc
| Show All 11 Lines | |||||
| #include "node_geometry_util.hh" | #include "node_geometry_util.hh" | ||||
| namespace blender::nodes::node_geo_set_position_cc { | namespace blender::nodes::node_geo_set_position_cc { | ||||
| static void node_declare(NodeDeclarationBuilder &b) | static void node_declare(NodeDeclarationBuilder &b) | ||||
| { | { | ||||
| b.add_input<decl::Geometry>(N_("Geometry")); | b.add_input<decl::Geometry>(N_("Geometry")); | ||||
| b.add_input<decl::Bool>(N_("Selection")).default_value(true).hide_value().supports_field(); | b.add_input<decl::Bool>(N_("Selection")).default_value(true).hide_value().field_on_all(); | ||||
| b.add_input<decl::Vector>(N_("Position")).implicit_field(implicit_field_inputs::position); | b.add_input<decl::Vector>(N_("Position")).implicit_field_on_all(implicit_field_inputs::position); | ||||
| b.add_input<decl::Vector>(N_("Offset")).supports_field().subtype(PROP_TRANSLATION); | b.add_input<decl::Vector>(N_("Offset")).field_on_all().subtype(PROP_TRANSLATION); | ||||
| b.add_output<decl::Geometry>(N_("Geometry")); | b.add_output<decl::Geometry>(N_("Geometry")).propagate_all(); | ||||
| } | } | ||||
| static void set_computed_position_and_offset(GeometryComponent &component, | static void set_computed_position_and_offset(GeometryComponent &component, | ||||
| const VArray<float3> &in_positions, | const VArray<float3> &in_positions, | ||||
| const VArray<float3> &in_offsets, | const VArray<float3> &in_offsets, | ||||
| const IndexMask selection) | const IndexMask selection) | ||||
| { | { | ||||
| MutableAttributeAccessor attributes = *component.attributes_for_write(); | MutableAttributeAccessor attributes = *component.attributes_for_write(); | ||||
| ▲ Show 20 Lines • Show All 174 Lines • Show Last 20 Lines | |||||