[Bf-blender-cvs] [4226d550c02] virtual-array-attributes: fixes
Jacques Lucke
noreply at git.blender.org
Tue Apr 13 13:25:47 CEST 2021
Commit: 4226d550c02dcc62d265542874d76b69ae6e0a91
Author: Jacques Lucke
Date: Tue Apr 13 11:56:17 2021 +0200
Branches: virtual-array-attributes
https://developer.blender.org/rB4226d550c02dcc62d265542874d76b69ae6e0a91
fixes
===================================================================
M source/blender/blenkernel/BKE_attribute_access.hh
M source/blender/blenkernel/BKE_geometry_set.hh
===================================================================
diff --git a/source/blender/blenkernel/BKE_attribute_access.hh b/source/blender/blenkernel/BKE_attribute_access.hh
index 4d234a5a03b..041b66517f4 100644
--- a/source/blender/blenkernel/BKE_attribute_access.hh
+++ b/source/blender/blenkernel/BKE_attribute_access.hh
@@ -124,7 +124,7 @@ template<typename T> class OutputAttribute_Typed {
OutputAttribute_Typed(OutputAttribute attribute) : attribute_(std::move(attribute))
{
if (attribute_) {
- varray_.emplace(attribute_.varray());
+ optional_varray_.emplace(attribute_.varray());
varray_ = &**optional_varray_;
}
}
@@ -144,7 +144,7 @@ template<typename T> class OutputAttribute_Typed {
return varray_;
}
- GVMutableArray<T> &varray()
+ VMutableArray<T> &varray()
{
return *varray_;
}
diff --git a/source/blender/blenkernel/BKE_geometry_set.hh b/source/blender/blenkernel/BKE_geometry_set.hh
index ff823251f14..2981945654d 100644
--- a/source/blender/blenkernel/BKE_geometry_set.hh
+++ b/source/blender/blenkernel/BKE_geometry_set.hh
@@ -167,7 +167,9 @@ class GeometryComponent {
{
const blender::fn::CPPType &cpp_type = blender::fn::CPPType::get<T>();
const CustomDataType type = blender::bke::cpp_type_to_custom_data_type(cpp_type);
- return this->attribute_get_for_read(attribute_name, domain, type, &default_value);
+ std::unique_ptr varray = this->attribute_get_for_read(
+ attribute_name, domain, type, &default_value);
+ return varray;
}
/**
@@ -191,7 +193,7 @@ class GeometryComponent {
const blender::StringRef attribute_name, const AttributeDomain domain)
{
const blender::fn::CPPType &cpp_type = blender::fn::CPPType::get<T>();
- const CustomDataType data_type = blender::bke::custom_data_type_to_cpp_type(cpp_type);
+ const CustomDataType data_type = blender::bke::cpp_type_to_custom_data_type(cpp_type);
return this->attribute_try_get_for_output(attribute_name, domain, data_type, nullptr);
}
More information about the Bf-blender-cvs
mailing list