diff options
author | Jacques Lucke <jacques@blender.org> | 2021-04-16 16:08:07 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2021-04-16 16:08:07 +0300 |
commit | 83cd4724164cd3c9a44e6ebcf454f517fce5cc67 (patch) | |
tree | bda80eb818bd9180f36e5998723c12b6d80b4c6b | |
parent | 76d7e3a0cc96b219dcc7a80f9c7fa75313e9b316 (diff) |
fix
-rw-r--r-- | source/blender/nodes/intern/node_geometry_exec.cc | 5 |
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); } |