17 b.use_custom_socket_order();
18 b.allow_any_socket_order();
21 .
description(
"Instances to translate individually");
22 b.add_output<
decl::Geometry>(
"Instances").propagate_all().align_with_previous();
25 b.add_input<
decl::Bool>(
"Local Space").default_value(
true).field_on_all();
44 if (local_spaces[
i]) {
48 transforms[
i].location() += translations[
i];
59 params.set_output(
"Instances", std::move(geometry_set));
67 ntype.
ui_name =
"Translate Instances";
68 ntype.
ui_description =
"Move top-level geometry instances in local or global space";
#define NODE_CLASS_GEOMETRY
#define GEO_NODE_TRANSLATE_INSTANCES
#define NOD_REGISTER_NODE(REGISTER_FUNC)
int instances_num() const
MutableSpan< float4x4 > transforms_for_write()
void set_selection(Field< bool > selection)
int add(GField field, GVArray *varray_ptr)
IndexMask get_evaluated_selection_as_mask() const
const GVArray & get_evaluated(const int field_index) const
void foreach_index(Fn &&fn) const
void node_register_type(bNodeType &ntype)
MatT from_location(const typename MatT::loc_type &location)
static void translate_instances(GeoNodeExecParams ¶ms, bke::Instances &instances)
static void register_node()
static void node_geo_exec(GeoNodeExecParams params)
static void node_declare(NodeDeclarationBuilder &b)
VecBase< float, 3 > float3
void geo_node_type_base(blender::bke::bNodeType *ntype, std::string idname, const std::optional< int16_t > legacy_type)
Instances * get_instances_for_write()
std::string ui_description
NodeGeometryExecFunction geometry_node_execute
const char * enum_name_legacy
NodeDeclareFunction declare