Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacques Lucke <jacques@blender.org>2021-04-16 16:08:07 +0300
committerJacques Lucke <jacques@blender.org>2021-04-16 16:08:07 +0300
commit83cd4724164cd3c9a44e6ebcf454f517fce5cc67 (patch)
treebda80eb818bd9180f36e5998723c12b6d80b4c6b
parent76d7e3a0cc96b219dcc7a80f9c7fa75313e9b316 (diff)
fix
-rw-r--r--source/blender/nodes/intern/node_geometry_exec.cc5
1 files changed, 5 insertions, 0 deletions
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);
}