Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/geometry/nodes/node_geo_interpolate_domain.cc
| Show First 20 Lines • Show All 105 Lines • ▼ Show 20 Lines | GVArray get_varray_for_context(const bke::GeometryFieldContext &context, | ||||
| 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( | |||||
| const GeometryComponent & /*component*/) const override | |||||
| { | |||||
| return src_domain_; | |||||
| } | |||||
| }; | }; | ||||
| static StringRefNull identifier_suffix(eCustomDataType data_type) | static StringRefNull identifier_suffix(eCustomDataType data_type) | ||||
| { | { | ||||
| switch (data_type) { | switch (data_type) { | ||||
| case CD_PROP_BOOL: | case CD_PROP_BOOL: | ||||
| return "Bool"; | return "Bool"; | ||||
| case CD_PROP_FLOAT: | case CD_PROP_FLOAT: | ||||
| ▲ Show 20 Lines • Show All 46 Lines • Show Last 20 Lines | |||||