[Bf-blender-cvs] [83cd4724164] virtual-array-attributes: fix
Jacques Lucke
noreply at git.blender.org
Sat Apr 17 14:25:50 CEST 2021
Commit: 83cd4724164cd3c9a44e6ebcf454f517fce5cc67
Author: Jacques Lucke
Date: Fri Apr 16 15:08:07 2021 +0200
Branches: virtual-array-attributes
https://developer.blender.org/rB83cd4724164cd3c9a44e6ebcf454f517fce5cc67
fix
===================================================================
M source/blender/nodes/intern/node_geometry_exec.cc
===================================================================
diff --git a/source/blender/nodes/intern/node_geometry_exec.cc b/source/blender/nodes/intern/node_geometry_exec.cc
index 273b7604364..22a29b7e512 100644
--- a/source/blender/nodes/intern/node_geometry_exec.cc
+++ b/source/blender/nodes/intern/node_geometry_exec.cc
@@ -64,6 +64,11 @@ std::unique_ptr<GVArray> GeoNodeExecParams::get_input_attribute(const StringRef
BLI_assert(found_socket != nullptr); /* There should always be available socket for the name. */
const CPPType *cpp_type = bke::custom_data_type_to_cpp_type(type);
const int64_t domain_size = component.attribute_domain_size(domain);
+
+ if (default_value == nullptr) {
+ default_value = cpp_type->default_value();
+ }
+
if (found_socket == nullptr) {
return std::make_unique<fn::GVArray_For_SingleValue>(*cpp_type, domain_size, default_value);
}
More information about the Bf-blender-cvs
mailing list