[Bf-blender-cvs] [90791063eb2] virtual-array-attributes: rename
Jacques Lucke
noreply at git.blender.org
Tue Apr 13 09:01:51 CEST 2021
Commit: 90791063eb27b5332c551838df2b60b3cf916bcc
Author: Jacques Lucke
Date: Tue Apr 13 08:28:16 2021 +0200
Branches: virtual-array-attributes
https://developer.blender.org/rB90791063eb27b5332c551838df2b60b3cf916bcc
rename
===================================================================
M source/blender/blenkernel/BKE_attribute_access.hh
M source/blender/blenkernel/BKE_geometry_set.hh
M source/blender/blenkernel/intern/attribute_access.cc
M source/blender/nodes/NOD_geometry_exec.hh
M source/blender/nodes/geometry/nodes/node_geo_align_rotation_to_vector.cc
M source/blender/nodes/geometry/nodes/node_geo_attribute_clamp.cc
M source/blender/nodes/geometry/nodes/node_geo_attribute_color_ramp.cc
M source/blender/nodes/geometry/nodes/node_geo_attribute_combine_xyz.cc
M source/blender/nodes/geometry/nodes/node_geo_attribute_compare.cc
M source/blender/nodes/geometry/nodes/node_geo_attribute_convert.cc
M source/blender/nodes/geometry/nodes/node_geo_attribute_fill.cc
M source/blender/nodes/geometry/nodes/node_geo_attribute_map_range.cc
M source/blender/nodes/geometry/nodes/node_geo_attribute_math.cc
===================================================================
diff --git a/source/blender/blenkernel/BKE_attribute_access.hh b/source/blender/blenkernel/BKE_attribute_access.hh
index dbd27434ad5..fe901848852 100644
--- a/source/blender/blenkernel/BKE_attribute_access.hh
+++ b/source/blender/blenkernel/BKE_attribute_access.hh
@@ -59,9 +59,9 @@ struct WriteAttributeLookup {
}
};
-class MaybeUnsavedWriteAttribute {
+class OutputAttribute {
public:
- using SaveF = std::function<void(MaybeUnsavedWriteAttribute &)>;
+ using SaveF = std::function<void(OutputAttribute &)>;
private:
std::unique_ptr<GVMutableArray> varray_;
@@ -69,11 +69,9 @@ class MaybeUnsavedWriteAttribute {
SaveF save_;
public:
- MaybeUnsavedWriteAttribute() = default;
+ OutputAttribute() = default;
- MaybeUnsavedWriteAttribute(std::unique_ptr<GVMutableArray> varray,
- AttributeDomain domain,
- SaveF save)
+ OutputAttribute(std::unique_ptr<GVMutableArray> varray, AttributeDomain domain, SaveF save)
: varray_(std::move(varray)), domain_(domain), save_(std::move(save))
{
}
diff --git a/source/blender/blenkernel/BKE_geometry_set.hh b/source/blender/blenkernel/BKE_geometry_set.hh
index e9c6793b63d..7800f024201 100644
--- a/source/blender/blenkernel/BKE_geometry_set.hh
+++ b/source/blender/blenkernel/BKE_geometry_set.hh
@@ -180,7 +180,7 @@ class GeometryComponent {
*
* This might return no attribute when the attribute cannot exist on the component.
*/
- blender::bke::MaybeUnsavedWriteAttribute attribute_try_get_for_output(
+ blender::bke::OutputAttribute attribute_try_get_for_output(
const blender::StringRef attribute_name,
const AttributeDomain domain,
const CustomDataType data_type,
diff --git a/source/blender/blenkernel/intern/attribute_access.cc b/source/blender/blenkernel/intern/attribute_access.cc
index dc530893e6e..a3ba6a472b4 100644
--- a/source/blender/blenkernel/intern/attribute_access.cc
+++ b/source/blender/blenkernel/intern/attribute_access.cc
@@ -768,7 +768,7 @@ std::unique_ptr<blender::bke::GVArray> GeometryComponent::attribute_get_for_read
return std::make_unique<blender::fn::GVArray_For_SingleValue>(*type, domain_size, default_value);
}
-blender::bke::MaybeUnsavedWriteAttribute GeometryComponent::attribute_try_get_for_output(
+blender::bke::OutputAttribute GeometryComponent::attribute_try_get_for_output(
const StringRef attribute_name,
const AttributeDomain domain,
const CustomDataType data_type,
diff --git a/source/blender/nodes/NOD_geometry_exec.hh b/source/blender/nodes/NOD_geometry_exec.hh
index 4cbdf5d9d9d..d4a4f4d8028 100644
--- a/source/blender/nodes/NOD_geometry_exec.hh
+++ b/source/blender/nodes/NOD_geometry_exec.hh
@@ -34,7 +34,7 @@ struct ModifierData;
namespace blender::nodes {
using bke::geometry_set_realize_instances;
-using bke::MaybeUnsavedWriteAttribute;
+using bke::OutputAttribute;
using bke::PersistentDataHandleMap;
using bke::PersistentObjectHandle;
using bke::ReadAttributeLookup;
diff --git a/source/blender/nodes/geometry/nodes/node_geo_align_rotation_to_vector.cc b/source/blender/nodes/geometry/nodes/node_geo_align_rotation_to_vector.cc
index 0efa8bdc155..ef8a9b99d18 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_align_rotation_to_vector.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_align_rotation_to_vector.cc
@@ -144,7 +144,7 @@ static void align_rotations_on_component(GeometryComponent &component,
const NodeGeometryAlignRotationToVector &storage = *(const NodeGeometryAlignRotationToVector *)
node.storage;
- MaybeUnsavedWriteAttribute rotations_attr = component.attribute_try_get_for_output(
+ OutputAttribute rotations_attr = component.attribute_try_get_for_output(
"rotation", ATTR_DOMAIN_POINT, CD_PROP_FLOAT3);
if (!rotations_attr) {
return;
diff --git a/source/blender/nodes/geometry/nodes/node_geo_attribute_clamp.cc b/source/blender/nodes/geometry/nodes/node_geo_attribute_clamp.cc
index 110db4430be..acbbf6e93c3 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_attribute_clamp.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_attribute_clamp.cc
@@ -160,7 +160,7 @@ static void clamp_attribute(GeometryComponent &component, const GeoNodeExecParam
std::unique_ptr<GVArray> attribute_input = component.attribute_try_get_for_read(
attribute_name, domain, data_type);
- MaybeUnsavedWriteAttribute attribute_result = component.attribute_try_get_for_output(
+ OutputAttribute attribute_result = component.attribute_try_get_for_output(
result_name, domain, data_type);
if (!attribute_result) {
diff --git a/source/blender/nodes/geometry/nodes/node_geo_attribute_color_ramp.cc b/source/blender/nodes/geometry/nodes/node_geo_attribute_color_ramp.cc
index 2bf31e36fac..7d77c18b236 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_attribute_color_ramp.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_attribute_color_ramp.cc
@@ -74,7 +74,7 @@ static void execute_on_component(const GeoNodeExecParams ¶ms, GeometryCompon
const CustomDataType result_type = CD_PROP_COLOR;
const AttributeDomain result_domain = get_result_domain(component, input_name, result_name);
- MaybeUnsavedWriteAttribute attribute_result = component.attribute_try_get_for_output(
+ OutputAttribute attribute_result = component.attribute_try_get_for_output(
result_name, result_domain, result_type);
if (!attribute_result) {
return;
diff --git a/source/blender/nodes/geometry/nodes/node_geo_attribute_combine_xyz.cc b/source/blender/nodes/geometry/nodes/node_geo_attribute_combine_xyz.cc
index 94557353360..186382cc434 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_attribute_combine_xyz.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_attribute_combine_xyz.cc
@@ -94,7 +94,7 @@ static void combine_attributes(GeometryComponent &component, const GeoNodeExecPa
}
const AttributeDomain result_domain = get_result_domain(component, params, result_name);
- MaybeUnsavedWriteAttribute attribute_result = component.attribute_try_get_for_output(
+ OutputAttribute attribute_result = component.attribute_try_get_for_output(
result_name, result_domain, CD_PROP_FLOAT3);
if (!attribute_result) {
return;
diff --git a/source/blender/nodes/geometry/nodes/node_geo_attribute_compare.cc b/source/blender/nodes/geometry/nodes/node_geo_attribute_compare.cc
index 8bf3293050b..3854f16050f 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_attribute_compare.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_attribute_compare.cc
@@ -257,7 +257,7 @@ static void attribute_compare_calc(GeometryComponent &component, const GeoNodeEx
const CustomDataType result_type = CD_PROP_BOOL;
const AttributeDomain result_domain = get_result_domain(component, params, result_name);
- MaybeUnsavedWriteAttribute attribute_result = component.attribute_try_get_for_output(
+ OutputAttribute attribute_result = component.attribute_try_get_for_output(
result_name, result_domain, result_type);
if (!attribute_result) {
return;
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 307e548eee0..ddb917b5d0b 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_attribute_convert.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_attribute_convert.cc
@@ -86,7 +86,7 @@ static void attribute_convert_calc(GeometryComponent &component,
return;
}
- MaybeUnsavedWriteAttribute result_attribute = component.attribute_try_get_for_output(
+ OutputAttribute result_attribute = component.attribute_try_get_for_output(
result_name, result_domain, result_type);
if (!result_attribute) {
return;
diff --git a/source/blender/nodes/geometry/nodes/node_geo_attribute_fill.cc b/source/blender/nodes/geometry/nodes/node_geo_attribute_fill.cc
index 414be3aa91d..9b2c8820734 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_attribute_fill.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_attribute_fill.cc
@@ -93,7 +93,7 @@ static void fill_attribute(GeometryComponent &component, const GeoNodeExecParams
get_result_domain(component, attribute_name) :
domain;
- MaybeUnsavedWriteAttribute attribute = component.attribute_try_get_for_output(
+ OutputAttribute attribute = component.attribute_try_get_for_output(
attribute_name, result_domain, data_type);
if (!attribute) {
return;
diff --git a/source/blender/nodes/geometry/nodes/node_geo_attribute_map_range.cc b/source/blender/nodes/geometry/nodes/node_geo_attribute_map_range.cc
index 2c6b2ce0eef..de3b4ae3c78 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_attribute_map_range.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_attribute_map_range.cc
@@ -358,7 +358,7 @@ static void map_range_attribute(GeometryComponent &component, const GeoNodeExecP
return;
}
- MaybeUnsavedWriteAttribute attribute_result = component.attribute_try_get_for_output(
+ OutputAttribute attribute_result = component.attribute_try_get_for_output(
result_name, domain, data_type);
if (!attribute_result) {
params.error_message_add(NodeWarningType::Error,
diff --git a/source/blender/nodes/geometry/nodes/node_geo_attribute_math.cc b/source/blender/nodes/geometry/nodes/node_geo_attribute_math.cc
index 9897c3fcf34..d747e63fba2 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_attribute_math.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_attribute_math.cc
@@ -228,7 +228,7 @@ static void attribute_math_calc(GeometryComponent &component, const GeoNodeExecP
const AttributeDomain result_domain = get_result_domain(
component, params, operation, result_name);
- MaybeUnsavedWriteAttribute attribute_result = component.attribute_try_get_for_output(
+ OutputAttribute attribute_result = component.attribute_try_get_for_output(
result_name, result_domain, result_type);
if (!attribute_result) {
return;
More information about the Bf-blender-cvs
mailing list