[Bf-blender-cvs] [7834fcc67d2] master: Merge branch 'blender-v2.93-release'
Jacques Lucke
noreply at git.blender.org
Tue Apr 20 11:19:55 CEST 2021
Commit: 7834fcc67d28b9104faaf8b2379b9f094076a572
Author: Jacques Lucke
Date: Tue Apr 20 11:19:43 2021 +0200
Branches: master
https://developer.blender.org/rB7834fcc67d28b9104faaf8b2379b9f094076a572
Merge branch 'blender-v2.93-release'
===================================================================
===================================================================
diff --cc source/blender/nodes/geometry/nodes/node_geo_attribute_convert.cc
index ff20b5f35a4,19c3aaa9c85..bb46c5c84cd
--- a/source/blender/nodes/geometry/nodes/node_geo_attribute_convert.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_attribute_convert.cc
@@@ -66,6 -66,28 +66,28 @@@ static AttributeDomain get_result_domai
return ATTR_DOMAIN_POINT;
}
+ static bool conversion_can_be_skipped(const GeometryComponent &component,
+ const StringRef source_name,
+ const StringRef result_name,
+ const AttributeDomain result_domain,
+ const CustomDataType result_type)
+ {
+ if (source_name != result_name) {
+ return false;
+ }
- ReadAttributePtr read_attribute = component.attribute_try_get_for_read(source_name);
++ ReadAttributeLookup read_attribute = component.attribute_try_get_for_read(source_name);
+ if (!read_attribute) {
+ return false;
+ }
- if (read_attribute->domain() != result_domain) {
++ if (read_attribute.domain != result_domain) {
+ return false;
+ }
- if (read_attribute->cpp_type() != *bke::custom_data_type_to_cpp_type(result_type)) {
++ if (read_attribute.varray->type() != *bke::custom_data_type_to_cpp_type(result_type)) {
+ return false;
+ }
+ return true;
+ }
+
static void attribute_convert_calc(GeometryComponent &component,
const GeoNodeExecParams ¶ms,
const StringRef source_name,
@@@ -78,7 -100,11 +100,11 @@@
component, source_name, result_name) :
domain;
+ if (conversion_can_be_skipped(component, source_name, result_name, result_domain, result_type)) {
+ return;
+ }
+
- ReadAttributePtr source_attribute = component.attribute_try_get_for_read(
+ GVArrayPtr source_attribute = component.attribute_try_get_for_read(
source_name, result_domain, result_type);
if (!source_attribute) {
params.error_message_add(NodeWarningType::Error,
More information about the Bf-blender-cvs
mailing list