Blender V5.3
blender::nodes::node_geo_transfer_attributes_cc Namespace Reference

Functions

static void node_declare (NodeDeclarationBuilder &b)
static bool should_transfer (const Span< StringPattern > patterns, const bke::AttrDomain domain, const StringRef name, const bool exclude_names, MutableSpan< bool > r_found_attribute_using_pattern)
static bool add_attribute_with_array (bke::MutableAttributeAccessor &attributes, const StringRef name, const AttrDomain domain, const bke::AttrType type, GArray<> array, const bool replace_existing)
static void transfer_attributes (const Span< StringPattern > patterns, const bool exclude_names, const bke::AttributeAccessor &src_attributes, bke::MutableAttributeAccessor &dst_attributes, const Map< bke::AttrDomain, Field< int > > &src_id_fields, const Map< bke::AttrDomain, Field< int > > &dst_id_fields, FunctionRef< fn::FieldContext &(ResourceScope &scope, const bke::AttrDomain domain)> create_src_context, FunctionRef< fn::FieldContext &(ResourceScope &scope, const bke::AttrDomain domain)> create_dst_context, VectorSet< std::string > &r_transferred_names, MutableSpan< bool > r_found_attribute_using_pattern)
static void node_geo_exec (GeoNodeExecParams params)
static void node_register ()

Function Documentation

◆ add_attribute_with_array()

bool blender::nodes::node_geo_transfer_attributes_cc::add_attribute_with_array ( bke::MutableAttributeAccessor & attributes,
const StringRef name,
const AttrDomain domain,
const bke::AttrType type,
GArray<> array,
const bool replace_existing )
static

Add an attribute that takes ownership of the array. When replace_existing is true, an existing attribute with the same name is replaced.

Definition at line 126 of file node_geo_transfer_attributes.cc.

References blender::bke::MutableAttributeAccessor::add(), add_attribute_with_array(), blender::bke::MutableAttributeAccessor::add_override(), and blender::bke::subdiv::init().

Referenced by add_attribute_with_array(), and transfer_attributes().

◆ node_declare()

◆ node_geo_exec()

void blender::nodes::node_geo_transfer_attributes_cc::node_geo_exec ( GeoNodeExecParams params)
static

Definition at line 392 of file node_geo_transfer_attributes.cc.

References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::bke::CurvesGeometry::attributes(), blender::bke::GeometryComponent::attributes(), blender::bke::CurvesGeometry::attributes_for_write(), blender::bke::GeometryComponent::attributes_for_write(), blender::ResourceScope::construct(), blender::bke::GeometryComponent::Curve, blender::nodes::Error, blender::nodes::GeoNodeExecParams::error_message_add(), blender::nodes::GeoNodeExecParams::extract_input(), blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::extract_vector(), blender::nodes::GList::from_container(), blender::nodes::StringPattern::from_str(), blender::bke::GeometrySet::get_component_for_write(), blender::bke::GeometrySet::get_grease_pencil_for_write(), blender::bke::GeometrySet::has(), blender::bke::GeometrySet::has_grease_pencil(), blender::Vector< T, InlineBufferCapacity, Allocator >::index_range(), blender::IndexRange::IndexRange(), blender::nodes::Info, blender::bke::GeometryComponent::Instance, blender::blender::StringRefBase::is_empty(), blender::Vector< T, InlineBufferCapacity, Allocator >::is_empty(), blender::bke::GeometryComponent::Mesh, node_geo_exec(), blender::bke::GeometryComponent::PointCloud, blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::remove_if(), blender::nodes::GeoNodeExecParams::set_output(), blender::Vector< T, InlineBufferCapacity, Allocator >::size(), blender::blender::StringRefBase::startswith(), blender::bke::greasepencil::Drawing::strokes(), blender::bke::greasepencil::Drawing::strokes_for_write(), TIP_, and transfer_attributes().

Referenced by node_geo_exec(), and node_register().

◆ node_register()

◆ should_transfer()

bool blender::nodes::node_geo_transfer_attributes_cc::should_transfer ( const Span< StringPattern > patterns,
const bke::AttrDomain domain,
const StringRef name,
const bool exclude_names,
MutableSpan< bool > r_found_attribute_using_pattern )
static

◆ transfer_attributes()

void blender::nodes::node_geo_transfer_attributes_cc::transfer_attributes ( const Span< StringPattern > patterns,
const bool exclude_names,
const bke::AttributeAccessor & src_attributes,
bke::MutableAttributeAccessor & dst_attributes,
const Map< bke::AttrDomain, Field< int > > & src_id_fields,
const Map< bke::AttrDomain, Field< int > > & dst_id_fields,
FunctionRef< fn::FieldContext &(ResourceScope &scope, const bke::AttrDomain domain)> create_src_context,
FunctionRef< fn::FieldContext &(ResourceScope &scope, const bke::AttrDomain domain)> create_dst_context,
VectorSet< std::string > & r_transferred_names,
MutableSpan< bool > r_found_attribute_using_pattern )
static

Definition at line 141 of file node_geo_transfer_attributes.cc.

References blender::fn::FieldEvaluator::add(), blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), add_attribute_with_array(), blender::bke::MutableAttributeAccessor::add_override(), blender::ResourceScope::allocator(), blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::GArray< Allocator >::as_mutable_span(), blender::BLI_assert(), blender::GVArrayCommon::common_info(), blender::array_utils::copy(), blender::CommonVArrayInfo::data, blender::GArray< Allocator >::data(), blender::bke::AttributeIter::data_type, blender::CPPType::default_value(), blender::bke::AttributeIter::domain, blender::bke::AttributeAccessor::domain_size(), blender::fn::FieldEvaluator::evaluate(), blender::CPPType::fill_construct_indices(), blender::bke::GSpanAttributeWriter::finish(), blender::bke::AttributeAccessor::foreach_attribute(), blender::bke::attribute_math::gather(), blender::fn::FieldEvaluator::get_evaluated(), blender::fn::Field< T >::get_input_if(), blender::IndexMask::IndexMask(), blender::IndexRange::IndexRange(), blender::array_utils::indices_non_negative(), blender::CPPType::is_trivial, blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::items(), blender::bke::AttributeAccessor::lookup(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup(), blender::bke::MutableAttributeAccessor::lookup_for_write_span(), blender::bke::AttributeAccessor::lookup_meta_data(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_or_add_default(), blender::bke::MutableAttributeAccessor::lookup_or_add_for_write_only_span(), blender::bke::MutableAttributeAccessor::lookup_or_add_for_write_span(), blender::GVArrayCommon::materialize_to_uninitialized(), blender::bke::AttributeIter::name, blender::threading::parallel_for(), blender::bke::GAttributeReader::sharing_info, should_transfer(), blender::CommonVArrayInfo::Single, blender::GVArrayCommon::size(), blender::GMutableSpan::slice(), blender::GVArray::slice(), blender::CommonVArrayInfo::Span, blender::bke::GSpanAttributeWriter::span, transfer_attributes(), blender::CommonVArrayInfo::type, blender::GVArrayCommon::type(), and blender::bke::GAttributeReader::varray.

Referenced by node_geo_exec(), and transfer_attributes().