Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/geometry/nodes/node_geo_interpolate_domain.cc
| Show First 20 Lines • Show All 98 Lines • ▼ Show 20 Lines | public: | ||||
| GVArray get_varray_for_context(const bke::GeometryFieldContext &context, | GVArray get_varray_for_context(const bke::GeometryFieldContext &context, | ||||
| IndexMask /*mask*/) const final | IndexMask /*mask*/) const final | ||||
| { | { | ||||
| const bke::AttributeAccessor attributes = *context.attributes(); | const bke::AttributeAccessor attributes = *context.attributes(); | ||||
| const bke::GeometryFieldContext other_domain_context{ | const bke::GeometryFieldContext other_domain_context{ | ||||
| context.geometry(), context.type(), src_domain_}; | context.geometry(), context.type(), src_domain_}; | ||||
| const int64_t src_domain_size = attributes.domain_size(src_domain_); | const int64_t src_domain_size = attributes.domain_size(src_domain_); | ||||
| GArray values(src_field_.cpp_type(), src_domain_size); | GArray<> values(src_field_.cpp_type(), src_domain_size); | ||||
| FieldEvaluator value_evaluator{other_domain_context, src_domain_size}; | FieldEvaluator value_evaluator{other_domain_context, src_domain_size}; | ||||
| value_evaluator.add_with_destination(src_field_, values.as_mutable_span()); | value_evaluator.add_with_destination(src_field_, values.as_mutable_span()); | ||||
| value_evaluator.evaluate(); | value_evaluator.evaluate(); | ||||
| return attributes.adapt_domain( | return attributes.adapt_domain( | ||||
| GVArray::ForGArray(std::move(values)), src_domain_, context.domain()); | GVArray::ForGArray(std::move(values)), src_domain_, context.domain()); | ||||
| } | } | ||||
| std::optional<eAttrDomain> preferred_domain( | std::optional<eAttrDomain> preferred_domain( | ||||
| ▲ Show 20 Lines • Show All 58 Lines • Show Last 20 Lines | |||||