Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r--source/blender/blenkernel/BKE_attribute_access.hh30
-rw-r--r--source/blender/blenkernel/BKE_curves.hh13
-rw-r--r--source/blender/blenkernel/BKE_geometry_set.hh48
-rw-r--r--source/blender/blenkernel/BKE_mesh_sample.hh7
-rw-r--r--source/blender/blenkernel/BKE_spline.hh22
-rw-r--r--source/blender/blenkernel/BKE_type_conversions.hh6
-rw-r--r--source/blender/blenkernel/intern/attribute_access.cc46
-rw-r--r--source/blender/blenkernel/intern/curve_catmull_rom.cc4
-rw-r--r--source/blender/blenkernel/intern/curve_eval.cc4
-rw-r--r--source/blender/blenkernel/intern/curve_nurbs.cc4
-rw-r--r--source/blender/blenkernel/intern/curve_to_mesh_convert.cc3
-rw-r--r--source/blender/blenkernel/intern/curves_geometry.cc6
-rw-r--r--source/blender/blenkernel/intern/geometry_component_curve.cc8
-rw-r--r--source/blender/blenkernel/intern/geometry_component_curves.cc2
-rw-r--r--source/blender/blenkernel/intern/geometry_component_instances.cc4
-rw-r--r--source/blender/blenkernel/intern/geometry_component_mesh.cc4
-rw-r--r--source/blender/blenkernel/intern/spline_base.cc11
-rw-r--r--source/blender/blenkernel/intern/spline_bezier.cc2
-rw-r--r--source/blender/blenkernel/intern/spline_nurbs.cc2
-rw-r--r--source/blender/blenkernel/intern/spline_poly.cc2
-rw-r--r--source/blender/blenkernel/intern/type_conversions.cc31
21 files changed, 119 insertions, 140 deletions
diff --git a/source/blender/blenkernel/BKE_attribute_access.hh b/source/blender/blenkernel/BKE_attribute_access.hh
index e36163878a5..36f29c7fbb7 100644
--- a/source/blender/blenkernel/BKE_attribute_access.hh
+++ b/source/blender/blenkernel/BKE_attribute_access.hh
@@ -4,14 +4,13 @@
#include <mutex>
-#include "FN_generic_span.hh"
-#include "FN_generic_virtual_array.hh"
-
#include "BKE_anonymous_attribute.hh"
#include "BKE_attribute.h"
#include "BLI_color.hh"
#include "BLI_function_ref.hh"
+#include "BLI_generic_span.hh"
+#include "BLI_generic_virtual_array.hh"
#include "BLI_math_vec_types.hh"
/**
@@ -132,9 +131,9 @@ struct AttributeInitDefault : public AttributeInit {
* Note that this can be used to fill the new attribute with the default
*/
struct AttributeInitVArray : public AttributeInit {
- blender::fn::GVArray varray;
+ blender::GVArray varray;
- AttributeInitVArray(blender::fn::GVArray varray)
+ AttributeInitVArray(blender::GVArray varray)
: AttributeInit(Type::VArray), varray(std::move(varray))
{
}
@@ -165,9 +164,6 @@ using AttributeForeachCallback = blender::FunctionRef<bool(
namespace blender::bke {
-using fn::GVArray;
-using fn::GVMutableArray;
-
const CPPType *custom_data_type_to_cpp_type(const CustomDataType type);
CustomDataType cpp_type_to_custom_data_type(const CPPType &type);
CustomDataType attribute_data_type_highest_complexity(Span<CustomDataType> data_types);
@@ -237,7 +233,7 @@ class OutputAttribute {
GVMutableArray varray_;
AttributeDomain domain_ = ATTR_DOMAIN_AUTO;
SaveFn save_;
- std::unique_ptr<fn::GVMutableArray_GSpan> optional_span_varray_;
+ std::unique_ptr<GVMutableArray_GSpan> optional_span_varray_;
bool ignore_old_values_ = false;
bool save_has_been_called_ = false;
@@ -254,13 +250,13 @@ class OutputAttribute {
operator bool() const;
GVMutableArray &operator*();
- fn::GVMutableArray *operator->();
+ GVMutableArray *operator->();
GVMutableArray &varray();
AttributeDomain domain() const;
const CPPType &cpp_type() const;
CustomDataType custom_data_type() const;
- fn::GMutableSpan as_span();
+ GMutableSpan as_span();
template<typename T> MutableSpan<T> as_span();
void save();
@@ -374,16 +370,16 @@ class CustomDataAttributes {
void clear();
- std::optional<blender::fn::GSpan> get_for_read(const AttributeIDRef &attribute_id) const;
+ std::optional<blender::GSpan> get_for_read(const AttributeIDRef &attribute_id) const;
/**
* Return a virtual array for a stored attribute, or a single value virtual array with the
* default value if the attribute doesn't exist. If no default value is provided, the default
* value for the type will be used.
*/
- blender::fn::GVArray get_for_read(const AttributeIDRef &attribute_id,
- const CustomDataType data_type,
- const void *default_value) const;
+ blender::GVArray get_for_read(const AttributeIDRef &attribute_id,
+ const CustomDataType data_type,
+ const void *default_value) const;
template<typename T>
blender::VArray<T> get_for_read(const AttributeIDRef &attribute_id, const T &default_value) const
@@ -394,7 +390,7 @@ class CustomDataAttributes {
return varray.typed<T>();
}
- std::optional<blender::fn::GMutableSpan> get_for_write(const AttributeIDRef &attribute_id);
+ std::optional<blender::GMutableSpan> get_for_write(const AttributeIDRef &attribute_id);
bool create(const AttributeIDRef &attribute_id, const CustomDataType data_type);
bool create_by_move(const AttributeIDRef &attribute_id,
const CustomDataType data_type,
@@ -514,7 +510,7 @@ inline GVMutableArray &OutputAttribute::operator*()
return varray_;
}
-inline fn::GVMutableArray *OutputAttribute::operator->()
+inline GVMutableArray *OutputAttribute::operator->()
{
return &varray_;
}
diff --git a/source/blender/blenkernel/BKE_curves.hh b/source/blender/blenkernel/BKE_curves.hh
index 93b98a01fce..ea378c5a0a5 100644
--- a/source/blender/blenkernel/BKE_curves.hh
+++ b/source/blender/blenkernel/BKE_curves.hh
@@ -12,6 +12,7 @@
#include <mutex>
#include "BLI_float4x4.hh"
+#include "BLI_generic_virtual_array.hh"
#include "BLI_index_mask.hh"
#include "BLI_math_vec_types.hh"
#include "BLI_span.hh"
@@ -21,8 +22,6 @@
#include "BKE_attribute_access.hh"
-#include "FN_generic_virtual_array.hh"
-
namespace blender::bke {
template<typename T, BLI_ENABLE_IF(std::is_integral_v<T>)>
@@ -287,9 +286,7 @@ class CurvesGeometry : public ::CurvesGeometry {
* Attributes.
*/
- fn::GVArray adapt_domain(const fn::GVArray &varray,
- AttributeDomain from,
- AttributeDomain to) const;
+ GVArray adapt_domain(const GVArray &varray, AttributeDomain from, AttributeDomain to) const;
};
namespace curves {
@@ -375,7 +372,7 @@ int calculate_evaluated_size(int size, bool cyclic, int resolution);
* Evaluate the Catmull Rom curve. The length of the #dst span should be calculated with
* #calculate_evaluated_size and is expected to divide evenly by the #src span's segment size.
*/
-void interpolate_to_evaluated(fn::GSpan src, bool cyclic, int resolution, fn::GMutableSpan dst);
+void interpolate_to_evaluated(GSpan src, bool cyclic, int resolution, GMutableSpan dst);
} // namespace catmull_rom
@@ -439,8 +436,8 @@ void calculate_basis_cache(int size,
void interpolate_to_evaluated(const BasisCache &basis_cache,
int8_t order,
Span<float> control_weights,
- fn::GSpan src,
- fn::GMutableSpan dst);
+ GSpan src,
+ GMutableSpan dst);
} // namespace nurbs
diff --git a/source/blender/blenkernel/BKE_geometry_set.hh b/source/blender/blenkernel/BKE_geometry_set.hh
index 372922a24d2..bd392057436 100644
--- a/source/blender/blenkernel/BKE_geometry_set.hh
+++ b/source/blender/blenkernel/BKE_geometry_set.hh
@@ -131,9 +131,9 @@ class GeometryComponent {
* interpolate from one domain to another.
* \return null if the interpolation is not implemented.
*/
- blender::fn::GVArray attribute_try_adapt_domain(const blender::fn::GVArray &varray,
- const AttributeDomain from_domain,
- const AttributeDomain to_domain) const
+ blender::GVArray attribute_try_adapt_domain(const blender::GVArray &varray,
+ const AttributeDomain from_domain,
+ const AttributeDomain to_domain) const
{
return this->attribute_try_adapt_domain_impl(varray, from_domain, to_domain);
}
@@ -177,17 +177,17 @@ class GeometryComponent {
* and converted to the data type. Returns null when the attribute does not exist or cannot be
* interpolated or converted.
*/
- blender::fn::GVArray attribute_try_get_for_read(const blender::bke::AttributeIDRef &attribute_id,
- AttributeDomain domain,
- const CustomDataType data_type) const;
+ blender::GVArray attribute_try_get_for_read(const blender::bke::AttributeIDRef &attribute_id,
+ AttributeDomain domain,
+ const CustomDataType data_type) const;
/**
* Get a virtual array that refers to the data of an attribute, interpolated to the given domain.
* The data type is left unchanged. Returns null when the attribute does not exist or cannot be
* interpolated.
*/
- blender::fn::GVArray attribute_try_get_for_read(const blender::bke::AttributeIDRef &attribute_id,
- AttributeDomain domain) const;
+ blender::GVArray attribute_try_get_for_read(const blender::bke::AttributeIDRef &attribute_id,
+ AttributeDomain domain) const;
/**
* Get a virtual array that refers to the data of an attribute converted to the given data type.
@@ -202,10 +202,10 @@ class GeometryComponent {
* and converted to the data type. If that is not possible, the returned virtual array will
* contain a default value. This never returns null.
*/
- blender::fn::GVArray attribute_get_for_read(const blender::bke::AttributeIDRef &attribute_id,
- AttributeDomain domain,
- const CustomDataType data_type,
- const void *default_value = nullptr) const;
+ blender::GVArray attribute_get_for_read(const blender::bke::AttributeIDRef &attribute_id,
+ AttributeDomain domain,
+ const CustomDataType data_type,
+ const void *default_value = nullptr) const;
/* Use instead of the method above when the type is known at compile time for type safety. */
template<typename T>
blender::VArray<T> attribute_get_for_read(const blender::bke::AttributeIDRef &attribute_id,
@@ -268,9 +268,9 @@ class GeometryComponent {
private:
virtual const blender::bke::ComponentAttributeProviders *get_attribute_providers() const;
- virtual blender::fn::GVArray attribute_try_adapt_domain_impl(const blender::fn::GVArray &varray,
- AttributeDomain from_domain,
- AttributeDomain to_domain) const;
+ virtual blender::GVArray attribute_try_adapt_domain_impl(const blender::GVArray &varray,
+ AttributeDomain from_domain,
+ AttributeDomain to_domain) const;
};
template<typename T>
@@ -568,9 +568,9 @@ class MeshComponent : public GeometryComponent {
private:
const blender::bke::ComponentAttributeProviders *get_attribute_providers() const final;
- blender::fn::GVArray attribute_try_adapt_domain_impl(const blender::fn::GVArray &varray,
- AttributeDomain from_domain,
- AttributeDomain to_domain) const final;
+ blender::GVArray attribute_try_adapt_domain_impl(const blender::GVArray &varray,
+ AttributeDomain from_domain,
+ AttributeDomain to_domain) const final;
};
/**
@@ -672,9 +672,9 @@ class CurveComponentLegacy : public GeometryComponent {
private:
const blender::bke::ComponentAttributeProviders *get_attribute_providers() const final;
- blender::fn::GVArray attribute_try_adapt_domain_impl(const blender::fn::GVArray &varray,
- AttributeDomain from_domain,
- AttributeDomain to_domain) const final;
+ blender::GVArray attribute_try_adapt_domain_impl(const blender::GVArray &varray,
+ AttributeDomain from_domain,
+ AttributeDomain to_domain) const final;
};
/**
@@ -729,9 +729,9 @@ class CurveComponent : public GeometryComponent {
private:
const blender::bke::ComponentAttributeProviders *get_attribute_providers() const final;
- blender::fn::GVArray attribute_try_adapt_domain_impl(const blender::fn::GVArray &varray,
- AttributeDomain from_domain,
- AttributeDomain to_domain) const final;
+ blender::GVArray attribute_try_adapt_domain_impl(const blender::GVArray &varray,
+ AttributeDomain from_domain,
+ AttributeDomain to_domain) const final;
};
/**
diff --git a/source/blender/blenkernel/BKE_mesh_sample.hh b/source/blender/blenkernel/BKE_mesh_sample.hh
index a51dc7eef2f..a942f3bb7ed 100644
--- a/source/blender/blenkernel/BKE_mesh_sample.hh
+++ b/source/blender/blenkernel/BKE_mesh_sample.hh
@@ -6,8 +6,7 @@
* \ingroup bke
*/
-#include "FN_generic_virtual_array.hh"
-
+#include "BLI_generic_virtual_array.hh"
#include "BLI_math_vec_types.hh"
#include "BKE_attribute.h"
@@ -21,10 +20,6 @@ class OutputAttribute;
namespace blender::bke::mesh_surface_sample {
-using fn::GMutableSpan;
-using fn::GSpan;
-using fn::GVArray;
-
void sample_point_attribute(const Mesh &mesh,
Span<int> looptri_indices,
Span<float3> bary_coords,
diff --git a/source/blender/blenkernel/BKE_spline.hh b/source/blender/blenkernel/BKE_spline.hh
index 87f4ad6dc61..32330244c08 100644
--- a/source/blender/blenkernel/BKE_spline.hh
+++ b/source/blender/blenkernel/BKE_spline.hh
@@ -8,11 +8,10 @@
#include <mutex>
-#include "FN_generic_virtual_array.hh"
-
#include "DNA_curves_types.h"
#include "BLI_float4x4.hh"
+#include "BLI_generic_virtual_array.hh"
#include "BLI_math_vec_types.hh"
#include "BLI_vector.hh"
@@ -205,16 +204,16 @@ class Spline {
* points) to arbitrary parameters in between the evaluated points. The interpolation is quite
* simple, but this handles the cyclic and end point special cases.
*/
- void sample_with_index_factors(const blender::fn::GVArray &src,
+ void sample_with_index_factors(const blender::GVArray &src,
blender::Span<float> index_factors,
- blender::fn::GMutableSpan dst) const;
+ blender::GMutableSpan dst) const;
template<typename T>
void sample_with_index_factors(const blender::VArray<T> &src,
blender::Span<float> index_factors,
blender::MutableSpan<T> dst) const
{
this->sample_with_index_factors(
- blender::fn::GVArray(src), index_factors, blender::fn::GMutableSpan(dst));
+ blender::GVArray(src), index_factors, blender::GMutableSpan(dst));
}
template<typename T>
void sample_with_index_factors(blender::Span<T> src,
@@ -229,11 +228,11 @@ class Spline {
* evaluated points. For poly splines, the lifetime of the returned virtual array must not
* exceed the lifetime of the input data.
*/
- virtual blender::fn::GVArray interpolate_to_evaluated(const blender::fn::GVArray &src) const = 0;
- blender::fn::GVArray interpolate_to_evaluated(blender::fn::GSpan data) const;
+ virtual blender::GVArray interpolate_to_evaluated(const blender::GVArray &src) const = 0;
+ blender::GVArray interpolate_to_evaluated(blender::GSpan data) const;
template<typename T> blender::VArray<T> interpolate_to_evaluated(blender::Span<T> data) const
{
- return this->interpolate_to_evaluated(blender::fn::GSpan(data)).typed<T>();
+ return this->interpolate_to_evaluated(blender::GSpan(data)).typed<T>();
}
protected:
@@ -386,8 +385,7 @@ class BezierSpline final : public Spline {
*/
InterpolationData interpolation_data_from_index_factor(float index_factor) const;
- virtual blender::fn::GVArray interpolate_to_evaluated(
- const blender::fn::GVArray &src) const override;
+ virtual blender::GVArray interpolate_to_evaluated(const blender::GVArray &src) const override;
void evaluate_segment(int index,
int next_index,
@@ -541,7 +539,7 @@ class NURBSpline final : public Spline {
blender::Span<blender::float3> evaluated_positions() const final;
- blender::fn::GVArray interpolate_to_evaluated(const blender::fn::GVArray &src) const final;
+ blender::GVArray interpolate_to_evaluated(const blender::GVArray &src) const final;
protected:
void correct_end_tangents() const final;
@@ -599,7 +597,7 @@ class PolySpline final : public Spline {
* the original data. Therefore the lifetime of the returned virtual array must not be longer
* than the source data.
*/
- blender::fn::GVArray interpolate_to_evaluated(const blender::fn::GVArray &src) const final;
+ blender::GVArray interpolate_to_evaluated(const blender::GVArray &src) const final;
protected:
void correct_end_tangents() const final;
diff --git a/source/blender/blenkernel/BKE_type_conversions.hh b/source/blender/blenkernel/BKE_type_conversions.hh
index 8d3b2730a9c..5152989d137 100644
--- a/source/blender/blenkernel/BKE_type_conversions.hh
+++ b/source/blender/blenkernel/BKE_type_conversions.hh
@@ -56,11 +56,11 @@ class DataTypeConversions {
const void *from_value,
void *to_value) const;
- void convert_to_initialized_n(fn::GSpan from_span, fn::GMutableSpan to_span) const;
+ void convert_to_initialized_n(GSpan from_span, GMutableSpan to_span) const;
- fn::GVArray try_convert(fn::GVArray varray, const CPPType &to_type) const;
+ GVArray try_convert(GVArray varray, const CPPType &to_type) const;
- fn::GVMutableArray try_convert(fn::GVMutableArray varray, const CPPType &to_type) const;
+ GVMutableArray try_convert(GVMutableArray varray, const CPPType &to_type) const;
};
const DataTypeConversions &get_implicit_type_conversions();
diff --git a/source/blender/blenkernel/intern/attribute_access.cc b/source/blender/blenkernel/intern/attribute_access.cc
index f79e8ee7653..50e35c3c7c2 100644
--- a/source/blender/blenkernel/intern/attribute_access.cc
+++ b/source/blender/blenkernel/intern/attribute_access.cc
@@ -28,14 +28,14 @@
static CLG_LogRef LOG = {"bke.attribute_access"};
using blender::float3;
+using blender::GMutableSpan;
+using blender::GSpan;
+using blender::GVArrayImpl_For_GSpan;
using blender::Set;
using blender::StringRef;
using blender::StringRefNull;
using blender::bke::AttributeIDRef;
using blender::bke::OutputAttribute;
-using blender::fn::GMutableSpan;
-using blender::fn::GSpan;
-using blender::fn::GVArrayImpl_For_GSpan;
namespace blender::bke {
@@ -191,14 +191,14 @@ AttributeDomain attribute_domain_highest_priority(Span<AttributeDomain> domains)
return highest_priority_domain;
}
-fn::GMutableSpan OutputAttribute::as_span()
+GMutableSpan OutputAttribute::as_span()
{
if (!optional_span_varray_) {
const bool materialize_old_values = !ignore_old_values_;
- optional_span_varray_ = std::make_unique<fn::GVMutableArray_GSpan>(varray_,
- materialize_old_values);
+ optional_span_varray_ = std::make_unique<GVMutableArray_GSpan>(varray_,
+ materialize_old_values);
}
- fn::GVMutableArray_GSpan &span_varray = *optional_span_varray_;
+ GVMutableArray_GSpan &span_varray = *optional_span_varray_;
return span_varray;
}
@@ -917,8 +917,8 @@ blender::bke::ReadAttributeLookup GeometryComponent::attribute_try_get_for_read(
return {};
}
-blender::fn::GVArray GeometryComponent::attribute_try_adapt_domain_impl(
- const blender::fn::GVArray &varray,
+blender::GVArray GeometryComponent::attribute_try_adapt_domain_impl(
+ const blender::GVArray &varray,
const AttributeDomain from_domain,
const AttributeDomain to_domain) const
{
@@ -1101,15 +1101,15 @@ std::optional<AttributeMetaData> GeometryComponent::attribute_get_meta_data(
return result;
}
-static blender::fn::GVArray try_adapt_data_type(blender::fn::GVArray varray,
- const blender::CPPType &to_type)
+static blender::GVArray try_adapt_data_type(blender::GVArray varray,
+ const blender::CPPType &to_type)
{
const blender::bke::DataTypeConversions &conversions =
blender::bke::get_implicit_type_conversions();
return conversions.try_convert(std::move(varray), to_type);
}
-blender::fn::GVArray GeometryComponent::attribute_try_get_for_read(
+blender::GVArray GeometryComponent::attribute_try_get_for_read(
const AttributeIDRef &attribute_id,
const AttributeDomain domain,
const CustomDataType data_type) const
@@ -1119,7 +1119,7 @@ blender::fn::GVArray GeometryComponent::attribute_try_get_for_read(
return {};
}
- blender::fn::GVArray varray = std::move(attribute.varray);
+ blender::GVArray varray = std::move(attribute.varray);
if (!ELEM(domain, ATTR_DOMAIN_AUTO, attribute.domain)) {
varray = this->attribute_try_adapt_domain(std::move(varray), attribute.domain, domain);
if (!varray) {
@@ -1139,8 +1139,8 @@ blender::fn::GVArray GeometryComponent::attribute_try_get_for_read(
return varray;
}
-blender::fn::GVArray GeometryComponent::attribute_try_get_for_read(
- const AttributeIDRef &attribute_id, const AttributeDomain domain) const
+blender::GVArray GeometryComponent::attribute_try_get_for_read(const AttributeIDRef &attribute_id,
+ const AttributeDomain domain) const
{
if (!this->attribute_domain_supported(domain)) {
return {};
@@ -1175,12 +1175,12 @@ blender::bke::ReadAttributeLookup GeometryComponent::attribute_try_get_for_read(
return {conversions.try_convert(std::move(attribute.varray), *type), attribute.domain};
}
-blender::fn::GVArray GeometryComponent::attribute_get_for_read(const AttributeIDRef &attribute_id,
- const AttributeDomain domain,
- const CustomDataType data_type,
- const void *default_value) const
+blender::GVArray GeometryComponent::attribute_get_for_read(const AttributeIDRef &attribute_id,
+ const AttributeDomain domain,
+ const CustomDataType data_type,
+ const void *default_value) const
{
- blender::fn::GVArray varray = this->attribute_try_get_for_read(attribute_id, domain, data_type);
+ blender::GVArray varray = this->attribute_try_get_for_read(attribute_id, domain, data_type);
if (varray) {
return varray;
}
@@ -1189,10 +1189,10 @@ blender::fn::GVArray GeometryComponent::attribute_get_for_read(const AttributeID
default_value = type->default_value();
}
const int domain_size = this->attribute_domain_size(domain);
- return blender::fn::GVArray::ForSingle(*type, domain_size, default_value);
+ return blender::GVArray::ForSingle(*type, domain_size, default_value);
}
-class GVMutableAttribute_For_OutputAttribute : public blender::fn::GVArrayImpl_For_GSpan {
+class GVMutableAttribute_For_OutputAttribute : public blender::GVArrayImpl_For_GSpan {
public:
GeometryComponent *component;
std::string attribute_name;
@@ -1201,7 +1201,7 @@ class GVMutableAttribute_For_OutputAttribute : public blender::fn::GVArrayImpl_F
GVMutableAttribute_For_OutputAttribute(GMutableSpan data,
GeometryComponent &component,
const AttributeIDRef &attribute_id)
- : blender::fn::GVArrayImpl_For_GSpan(data), component(&component)
+ : blender::GVArrayImpl_For_GSpan(data), component(&component)
{
if (attribute_id.is_named()) {
this->attribute_name = attribute_id.name();
diff --git a/source/blender/blenkernel/intern/curve_catmull_rom.cc b/source/blender/blenkernel/intern/curve_catmull_rom.cc
index a247c67066b..27687eb736f 100644
--- a/source/blender/blenkernel/intern/curve_catmull_rom.cc
+++ b/source/blender/blenkernel/intern/curve_catmull_rom.cc
@@ -96,10 +96,10 @@ static void interpolate_to_evaluated(const Span<T> src,
});
}
-void interpolate_to_evaluated(const fn::GSpan src,
+void interpolate_to_evaluated(const GSpan src,
const bool cyclic,
const int resolution,
- fn::GMutableSpan dst)
+ GMutableSpan dst)
{
attribute_math::convert_to_static_type(src.type(), [&](auto dummy) {
using T = decltype(dummy);
diff --git a/source/blender/blenkernel/intern/curve_eval.cc b/source/blender/blenkernel/intern/curve_eval.cc
index 191a510947e..b2399f25638 100644
--- a/source/blender/blenkernel/intern/curve_eval.cc
+++ b/source/blender/blenkernel/intern/curve_eval.cc
@@ -20,6 +20,8 @@
using blender::Array;
using blender::float3;
using blender::float4x4;
+using blender::GVArray;
+using blender::GVArray_GSpan;
using blender::IndexRange;
using blender::Map;
using blender::MutableSpan;
@@ -32,8 +34,6 @@ using blender::bke::AttributeIDRef;
using blender::bke::OutputAttribute;
using blender::bke::OutputAttribute_Typed;
using blender::bke::ReadAttributeLookup;
-using blender::fn::GVArray;
-using blender::fn::GVArray_GSpan;
blender::Span<SplinePtr> CurveEval::splines() const
{
diff --git a/source/blender/blenkernel/intern/curve_nurbs.cc b/source/blender/blenkernel/intern/curve_nurbs.cc
index 3bec01520e8..a4cdbbca654 100644
--- a/source/blender/blenkernel/intern/curve_nurbs.cc
+++ b/source/blender/blenkernel/intern/curve_nurbs.cc
@@ -230,8 +230,8 @@ static void interpolate_to_evaluated_rational(const BasisCache &basis_cache,
void interpolate_to_evaluated(const BasisCache &basis_cache,
const int8_t order,
const Span<float> control_weights,
- const fn::GSpan src,
- fn::GMutableSpan dst)
+ const GSpan src,
+ GMutableSpan dst)
{
BLI_assert(dst.size() == basis_cache.start_indices.size());
diff --git a/source/blender/blenkernel/intern/curve_to_mesh_convert.cc b/source/blender/blenkernel/intern/curve_to_mesh_convert.cc
index 5d80ef47908..9b22a4c9726 100644
--- a/source/blender/blenkernel/intern/curve_to_mesh_convert.cc
+++ b/source/blender/blenkernel/intern/curve_to_mesh_convert.cc
@@ -16,9 +16,6 @@
#include "BKE_curve_to_mesh.hh"
-using blender::fn::GMutableSpan;
-using blender::fn::GSpan;
-
namespace blender::bke {
/** Information about the creation of one curve spline and profile spline combination. */
diff --git a/source/blender/blenkernel/intern/curves_geometry.cc b/source/blender/blenkernel/intern/curves_geometry.cc
index ff24720e5e5..45f3bf36381 100644
--- a/source/blender/blenkernel/intern/curves_geometry.cc
+++ b/source/blender/blenkernel/intern/curves_geometry.cc
@@ -1055,9 +1055,9 @@ static GVArray adapt_curve_domain_curve_to_point(const CurvesGeometry &curves,
return new_varray;
}
-fn::GVArray CurvesGeometry::adapt_domain(const fn::GVArray &varray,
- const AttributeDomain from,
- const AttributeDomain to) const
+GVArray CurvesGeometry::adapt_domain(const GVArray &varray,
+ const AttributeDomain from,
+ const AttributeDomain to) const
{
if (!varray) {
return {};
diff --git a/source/blender/blenkernel/intern/geometry_component_curve.cc b/source/blender/blenkernel/intern/geometry_component_curve.cc
index 0926d65b306..f409389e463 100644
--- a/source/blender/blenkernel/intern/geometry_component_curve.cc
+++ b/source/blender/blenkernel/intern/geometry_component_curve.cc
@@ -14,10 +14,10 @@
#include "attribute_access_intern.hh"
-using blender::fn::GMutableSpan;
-using blender::fn::GSpan;
-using blender::fn::GVArray;
-using blender::fn::GVArray_GSpan;
+using blender::GMutableSpan;
+using blender::GSpan;
+using blender::GVArray;
+using blender::GVArray_GSpan;
/* -------------------------------------------------------------------- */
/** \name Geometry Component Implementation
diff --git a/source/blender/blenkernel/intern/geometry_component_curves.cc b/source/blender/blenkernel/intern/geometry_component_curves.cc
index 86cbea9a9bb..7cf6fc5a03e 100644
--- a/source/blender/blenkernel/intern/geometry_component_curves.cc
+++ b/source/blender/blenkernel/intern/geometry_component_curves.cc
@@ -15,7 +15,7 @@
#include "attribute_access_intern.hh"
-using blender::fn::GVArray;
+using blender::GVArray;
/* -------------------------------------------------------------------- */
/** \name Geometry Component Implementation
diff --git a/source/blender/blenkernel/intern/geometry_component_instances.cc b/source/blender/blenkernel/intern/geometry_component_instances.cc
index 75384b5c420..0dc6f486d28 100644
--- a/source/blender/blenkernel/intern/geometry_component_instances.cc
+++ b/source/blender/blenkernel/intern/geometry_component_instances.cc
@@ -23,13 +23,13 @@
#include "BLI_cpp_type_make.hh"
using blender::float4x4;
+using blender::GSpan;
using blender::IndexMask;
using blender::Map;
using blender::MutableSpan;
using blender::Set;
using blender::Span;
using blender::VectorSet;
-using blender::fn::GSpan;
BLI_CPP_TYPE_MAKE(InstanceReference, InstanceReference, CPPTypeFlags::None)
@@ -164,7 +164,7 @@ void InstancesComponent::remove_instances(const IndexMask mask)
GSpan src = *src_attributes.get_for_read(id);
dst_attributes.create(id, meta_data.data_type);
- fn::GMutableSpan dst = *dst_attributes.get_for_write(id);
+ GMutableSpan dst = *dst_attributes.get_for_write(id);
attribute_math::convert_to_static_type(src.type(), [&](auto dummy) {
using T = decltype(dummy);
diff --git a/source/blender/blenkernel/intern/geometry_component_mesh.cc b/source/blender/blenkernel/intern/geometry_component_mesh.cc
index a07957e999c..76c8a0054b3 100644
--- a/source/blender/blenkernel/intern/geometry_component_mesh.cc
+++ b/source/blender/blenkernel/intern/geometry_component_mesh.cc
@@ -746,8 +746,8 @@ static GVArray adapt_mesh_domain_edge_to_face(const Mesh &mesh, const GVArray &v
} // namespace blender::bke
-blender::fn::GVArray MeshComponent::attribute_try_adapt_domain_impl(
- const blender::fn::GVArray &varray,
+blender::GVArray MeshComponent::attribute_try_adapt_domain_impl(
+ const blender::GVArray &varray,
const AttributeDomain from_domain,
const AttributeDomain to_domain) const
{
diff --git a/source/blender/blenkernel/intern/spline_base.cc b/source/blender/blenkernel/intern/spline_base.cc
index dc5b1d28539..eecb374cd63 100644
--- a/source/blender/blenkernel/intern/spline_base.cc
+++ b/source/blender/blenkernel/intern/spline_base.cc
@@ -1,6 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
#include "BLI_array.hh"
+#include "BLI_generic_virtual_array.hh"
#include "BLI_span.hh"
#include "BLI_task.hh"
#include "BLI_timeit.hh"
@@ -9,19 +10,17 @@
#include "BKE_attribute_math.hh"
#include "BKE_spline.hh"
-#include "FN_generic_virtual_array.hh"
-
using blender::Array;
using blender::float3;
+using blender::GMutableSpan;
+using blender::GSpan;
+using blender::GVArray;
using blender::IndexRange;
using blender::MutableSpan;
using blender::Span;
using blender::VArray;
using blender::attribute_math::convert_to_static_type;
using blender::bke::AttributeIDRef;
-using blender::fn::GMutableSpan;
-using blender::fn::GSpan;
-using blender::fn::GVArray;
CurveType Spline::type() const
{
@@ -100,7 +99,7 @@ void Spline::reverse()
this->attributes.foreach_attribute(
[&](const AttributeIDRef &id, const AttributeMetaData &meta_data) {
- std::optional<blender::fn::GMutableSpan> attribute = this->attributes.get_for_write(id);
+ std::optional<blender::GMutableSpan> attribute = this->attributes.get_for_write(id);
if (!attribute) {
BLI_assert_unreachable();
return false;
diff --git a/source/blender/blenkernel/intern/spline_bezier.cc b/source/blender/blenkernel/intern/spline_bezier.cc
index e9ae51b16f8..8e207f93bf5 100644
--- a/source/blender/blenkernel/intern/spline_bezier.cc
+++ b/source/blender/blenkernel/intern/spline_bezier.cc
@@ -8,11 +8,11 @@
using blender::Array;
using blender::float3;
+using blender::GVArray;
using blender::IndexRange;
using blender::MutableSpan;
using blender::Span;
using blender::VArray;
-using blender::fn::GVArray;
void BezierSpline::copy_settings(Spline &dst) const
{
diff --git a/source/blender/blenkernel/intern/spline_nurbs.cc b/source/blender/blenkernel/intern/spline_nurbs.cc
index a8a17b7aee6..9d1d5a53a43 100644
--- a/source/blender/blenkernel/intern/spline_nurbs.cc
+++ b/source/blender/blenkernel/intern/spline_nurbs.cc
@@ -9,11 +9,11 @@
using blender::Array;
using blender::float3;
+using blender::GVArray;
using blender::IndexRange;
using blender::MutableSpan;
using blender::Span;
using blender::VArray;
-using blender::fn::GVArray;
void NURBSpline::copy_settings(Spline &dst) const
{
diff --git a/source/blender/blenkernel/intern/spline_poly.cc b/source/blender/blenkernel/intern/spline_poly.cc
index a5d3fd47ede..122f7f6c059 100644
--- a/source/blender/blenkernel/intern/spline_poly.cc
+++ b/source/blender/blenkernel/intern/spline_poly.cc
@@ -6,9 +6,9 @@
#include "BKE_spline.hh"
using blender::float3;
+using blender::GVArray;
using blender::MutableSpan;
using blender::Span;
-using blender::fn::GVArray;
void PolySpline::copy_settings(Spline &UNUSED(dst)) const
{
diff --git a/source/blender/blenkernel/intern/type_conversions.cc b/source/blender/blenkernel/intern/type_conversions.cc
index 2e8b5b3433b..d10979eeee9 100644
--- a/source/blender/blenkernel/intern/type_conversions.cc
+++ b/source/blender/blenkernel/intern/type_conversions.cc
@@ -288,8 +288,7 @@ void DataTypeConversions::convert_to_uninitialized(const CPPType &from_type,
functions->convert_single_to_uninitialized(from_value, to_value);
}
-void DataTypeConversions::convert_to_initialized_n(fn::GSpan from_span,
- fn::GMutableSpan to_span) const
+void DataTypeConversions::convert_to_initialized_n(GSpan from_span, GMutableSpan to_span) const
{
const CPPType &from_type = from_span.type();
const CPPType &to_type = to_span.type();
@@ -305,19 +304,17 @@ void DataTypeConversions::convert_to_initialized_n(fn::GSpan from_span,
fn->call_auto(IndexRange(from_span.size()), params, context);
}
-class GVArray_For_ConvertedGVArray : public fn::GVArrayImpl {
+class GVArray_For_ConvertedGVArray : public GVArrayImpl {
private:
- fn::GVArray varray_;
+ GVArray varray_;
const CPPType &from_type_;
ConversionFunctions old_to_new_conversions_;
public:
- GVArray_For_ConvertedGVArray(fn::GVArray varray,
+ GVArray_For_ConvertedGVArray(GVArray varray,
const CPPType &to_type,
const DataTypeConversions &conversions)
- : fn::GVArrayImpl(to_type, varray.size()),
- varray_(std::move(varray)),
- from_type_(varray_.type())
+ : GVArrayImpl(to_type, varray.size()), varray_(std::move(varray)), from_type_(varray_.type())
{
old_to_new_conversions_ = *conversions.get_conversion_functions(from_type_, to_type);
}
@@ -340,18 +337,18 @@ class GVArray_For_ConvertedGVArray : public fn::GVArrayImpl {
}
};
-class GVMutableArray_For_ConvertedGVMutableArray : public fn::GVMutableArrayImpl {
+class GVMutableArray_For_ConvertedGVMutableArray : public GVMutableArrayImpl {
private:
- fn::GVMutableArray varray_;
+ GVMutableArray varray_;
const CPPType &from_type_;
ConversionFunctions old_to_new_conversions_;
ConversionFunctions new_to_old_conversions_;
public:
- GVMutableArray_For_ConvertedGVMutableArray(fn::GVMutableArray varray,
+ GVMutableArray_For_ConvertedGVMutableArray(GVMutableArray varray,
const CPPType &to_type,
const DataTypeConversions &conversions)
- : fn::GVMutableArrayImpl(to_type, varray.size()),
+ : GVMutableArrayImpl(to_type, varray.size()),
varray_(std::move(varray)),
from_type_(varray_.type())
{
@@ -384,7 +381,7 @@ class GVMutableArray_For_ConvertedGVMutableArray : public fn::GVMutableArrayImpl
}
};
-fn::GVArray DataTypeConversions::try_convert(fn::GVArray varray, const CPPType &to_type) const
+GVArray DataTypeConversions::try_convert(GVArray varray, const CPPType &to_type) const
{
const CPPType &from_type = varray.type();
if (from_type == to_type) {
@@ -393,11 +390,11 @@ fn::GVArray DataTypeConversions::try_convert(fn::GVArray varray, const CPPType &
if (!this->is_convertible(from_type, to_type)) {
return {};
}
- return fn::GVArray::For<GVArray_For_ConvertedGVArray>(std::move(varray), to_type, *this);
+ return GVArray::For<GVArray_For_ConvertedGVArray>(std::move(varray), to_type, *this);
}
-fn::GVMutableArray DataTypeConversions::try_convert(fn::GVMutableArray varray,
- const CPPType &to_type) const
+GVMutableArray DataTypeConversions::try_convert(GVMutableArray varray,
+ const CPPType &to_type) const
{
const CPPType &from_type = varray.type();
if (from_type == to_type) {
@@ -406,7 +403,7 @@ fn::GVMutableArray DataTypeConversions::try_convert(fn::GVMutableArray varray,
if (!this->is_convertible(from_type, to_type)) {
return {};
}
- return fn::GVMutableArray::For<GVMutableArray_For_ConvertedGVMutableArray>(
+ return GVMutableArray::For<GVMutableArray_For_ConvertedGVMutableArray>(
std::move(varray), to_type, *this);
}