[Bf-blender-cvs] [8c720c27716] virtual-array-attributes: rename
Jacques Lucke
noreply at git.blender.org
Wed Apr 14 12:51:14 CEST 2021
Commit: 8c720c27716f5413d7edda7986ce2bc59491d85c
Author: Jacques Lucke
Date: Wed Apr 14 12:41:26 2021 +0200
Branches: virtual-array-attributes
https://developer.blender.org/rB8c720c27716f5413d7edda7986ce2bc59491d85c
rename
===================================================================
M source/blender/blenkernel/BKE_attribute_access.hh
M source/blender/blenkernel/intern/geometry_set_instances.cc
M source/blender/functions/FN_generic_virtual_array.hh
M source/blender/functions/intern/generic_virtual_array.cc
M source/blender/nodes/geometry/nodes/node_geo_attribute_convert.cc
M source/blender/nodes/geometry/nodes/node_geo_attribute_randomize.cc
M source/blender/nodes/geometry/nodes/node_geo_join_geometry.cc
===================================================================
diff --git a/source/blender/blenkernel/BKE_attribute_access.hh b/source/blender/blenkernel/BKE_attribute_access.hh
index 4111ffbf3ae..e70eb8d3997 100644
--- a/source/blender/blenkernel/BKE_attribute_access.hh
+++ b/source/blender/blenkernel/BKE_attribute_access.hh
@@ -67,7 +67,7 @@ class OutputAttribute {
std::unique_ptr<GVMutableArray> varray_;
AttributeDomain domain_;
SaveF save_;
- std::optional<fn::GVMutableArray_Span> optional_span_varray_;
+ std::optional<fn::GVMutableArray_GSpan> optional_span_varray_;
public:
OutputAttribute() = default;
@@ -117,7 +117,7 @@ class OutputAttribute {
if (!optional_span_varray_.has_value()) {
optional_span_varray_.emplace(*varray_);
}
- fn::GVMutableArray_Span &span_varray = *optional_span_varray_;
+ fn::GVMutableArray_GSpan &span_varray = *optional_span_varray_;
return span_varray;
}
diff --git a/source/blender/blenkernel/intern/geometry_set_instances.cc b/source/blender/blenkernel/intern/geometry_set_instances.cc
index 3c40b732265..9bf399496e2 100644
--- a/source/blender/blenkernel/intern/geometry_set_instances.cc
+++ b/source/blender/blenkernel/intern/geometry_set_instances.cc
@@ -444,7 +444,7 @@ static void join_attributes(Span<GeometryInstanceGroup> set_groups,
continue;
}
- fn::GVMutableArray_Span dst_span{*write_attribute.varray};
+ fn::GVMutableArray_GSpan dst_span{*write_attribute.varray};
int offset = 0;
for (const GeometryInstanceGroup &set_group : set_groups) {
diff --git a/source/blender/functions/FN_generic_virtual_array.hh b/source/blender/functions/FN_generic_virtual_array.hh
index d0751d39e87..362b1815a61 100644
--- a/source/blender/functions/FN_generic_virtual_array.hh
+++ b/source/blender/functions/FN_generic_virtual_array.hh
@@ -528,17 +528,17 @@ template<typename T> class GVMutableArray_For_VMutableArray : public GVMutableAr
}
};
-class GVArray_Span final : public GSpan {
+class GVArray_GSpan final : public GSpan {
private:
const GVArray &varray_;
void *owned_data_ = nullptr;
public:
- GVArray_Span(const GVArray &varray);
- ~GVArray_Span();
+ GVArray_GSpan(const GVArray &varray);
+ ~GVArray_GSpan();
};
-class GVMutableArray_Span final : public GMutableSpan {
+class GVMutableArray_GSpan final : public GMutableSpan {
private:
GVMutableArray &varray_;
void *owned_data_ = nullptr;
@@ -546,8 +546,8 @@ class GVMutableArray_Span final : public GMutableSpan {
bool show_not_applied_warning_ = true;
public:
- GVMutableArray_Span(GVMutableArray &varray, bool materialize = true);
- ~GVMutableArray_Span();
+ GVMutableArray_GSpan(GVMutableArray &varray, bool materialize = true);
+ ~GVMutableArray_GSpan();
void apply();
void disable_not_applied_warning();
diff --git a/source/blender/functions/intern/generic_virtual_array.cc b/source/blender/functions/intern/generic_virtual_array.cc
index dab090e18b1..c6ae97b99ec 100644
--- a/source/blender/functions/intern/generic_virtual_array.cc
+++ b/source/blender/functions/intern/generic_virtual_array.cc
@@ -217,10 +217,10 @@ GVArray_For_SingleValue::~GVArray_For_SingleValue()
}
/* --------------------------------------------------------------------
- * GVArray_Span.
+ * GVArray_GSpan.
*/
-GVArray_Span::GVArray_Span(const GVArray &varray) : GSpan(varray.type()), varray_(varray)
+GVArray_GSpan::GVArray_GSpan(const GVArray &varray) : GSpan(varray.type()), varray_(varray)
{
if (varray_.is_span()) {
data_ = varray_.get_span().data();
@@ -233,7 +233,7 @@ GVArray_Span::GVArray_Span(const GVArray &varray) : GSpan(varray.type()), varray
size_ = varray_.size();
}
-GVArray_Span::~GVArray_Span()
+GVArray_GSpan::~GVArray_GSpan()
{
if (owned_data_ != nullptr) {
type_->destruct_n(owned_data_, size_);
@@ -242,10 +242,10 @@ GVArray_Span::~GVArray_Span()
}
/* --------------------------------------------------------------------
- * GVMutableArray_Span.
+ * GVMutableArray_GSpan.
*/
-GVMutableArray_Span::GVMutableArray_Span(GVMutableArray &varray, const bool materialize)
+GVMutableArray_GSpan::GVMutableArray_GSpan(GVMutableArray &varray, const bool materialize)
: GMutableSpan(varray.type()), varray_(varray)
{
if (varray_.is_span()) {
@@ -264,7 +264,7 @@ GVMutableArray_Span::GVMutableArray_Span(GVMutableArray &varray, const bool mate
size_ = varray_.size();
}
-GVMutableArray_Span::~GVMutableArray_Span()
+GVMutableArray_GSpan::~GVMutableArray_GSpan()
{
if (show_not_applied_warning_) {
if (!apply_has_been_called_) {
@@ -273,7 +273,7 @@ GVMutableArray_Span::~GVMutableArray_Span()
}
}
-void GVMutableArray_Span::apply()
+void GVMutableArray_GSpan::apply()
{
apply_has_been_called_ = true;
if (data_ != owned_data_) {
@@ -285,7 +285,7 @@ void GVMutableArray_Span::apply()
}
}
-void GVMutableArray_Span::disable_not_applied_warning()
+void GVMutableArray_GSpan::disable_not_applied_warning()
{
show_not_applied_warning_ = false;
}
diff --git a/source/blender/nodes/geometry/nodes/node_geo_attribute_convert.cc b/source/blender/nodes/geometry/nodes/node_geo_attribute_convert.cc
index 885860af7e8..f4c2ce7c7ec 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_attribute_convert.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_attribute_convert.cc
@@ -92,7 +92,7 @@ static void attribute_convert_calc(GeometryComponent &component,
return;
}
- fn::GVArray_Span source_span{*source_attribute};
+ fn::GVArray_GSpan source_span{*source_attribute};
fn::GMutableSpan result_span = result_attribute.as_span();
BLI_assert(source_span.size() == result_span.size());
diff --git a/source/blender/nodes/geometry/nodes/node_geo_attribute_randomize.cc b/source/blender/nodes/geometry/nodes/node_geo_attribute_randomize.cc
index caad5336899..da0d2e95a42 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_attribute_randomize.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_attribute_randomize.cc
@@ -178,7 +178,7 @@ Array<uint32_t> get_geometry_element_ids_as_uints(const GeometryComponent &compo
if (hash_attribute) {
BLI_assert(hashes.size() == hash_attribute->size());
const CPPType &cpp_type = hash_attribute->type();
- fn::GVArray_Span items{*hash_attribute};
+ fn::GVArray_GSpan items{*hash_attribute};
for (const int i : hashes.index_range()) {
hashes[i] = cpp_type.hash(items[i]);
}
diff --git a/source/blender/nodes/geometry/nodes/node_geo_join_geometry.cc b/source/blender/nodes/geometry/nodes/node_geo_join_geometry.cc
index 06ac60cd88c..5659be6dad0 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_join_geometry.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_join_geometry.cc
@@ -178,7 +178,7 @@ static void fill_new_attribute(Span<const GeometryComponent *> src_components,
std::unique_ptr<GVArray> read_attribute = component->attribute_get_for_read(
attribute_name, domain, data_type, nullptr);
- fn::GVArray_Span src_span{*read_attribute};
+ fn::GVArray_GSpan src_span{*read_attribute};
const void *src_buffer = src_span.data();
void *dst_buffer = dst_span[offset];
cpp_type->copy_to_initialized_n(src_buffer, dst_buffer, domain_size);
More information about the Bf-blender-cvs
mailing list