diff options
author | Jacques Lucke <jacques@blender.org> | 2020-12-18 15:28:43 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2020-12-18 15:28:55 +0300 |
commit | c5569ba140382015c32bd638532097ea05168607 (patch) | |
tree | 49c6930453534243e1fe5e7f7a88f1b9144e938b /source/blender/nodes | |
parent | 79d6bd9a227f9c07b2a1c3e55d9e06d8b8306f39 (diff) |
Geometry Nodes: do not crash when there are undefined nodes
Undefined geometry nodes will just output a default value now.
Diffstat (limited to 'source/blender/nodes')
-rw-r--r-- | source/blender/nodes/NOD_geometry_exec.hh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/nodes/NOD_geometry_exec.hh b/source/blender/nodes/NOD_geometry_exec.hh index cac04e18fc7..f278d6b4107 100644 --- a/source/blender/nodes/NOD_geometry_exec.hh +++ b/source/blender/nodes/NOD_geometry_exec.hh @@ -44,6 +44,7 @@ using bke::WriteAttribute; using bke::WriteAttributePtr; using fn::CPPType; using fn::GMutablePointer; +using fn::GPointer; using fn::GValueMap; class GeoNodeExecParams { @@ -123,6 +124,16 @@ class GeoNodeExecParams { output_values_.add_new_by_move(identifier, value); } + void set_output_by_copy(StringRef identifier, GPointer value) + { +#ifdef DEBUG + BLI_assert(value.type() != nullptr); + BLI_assert(value.get() != nullptr); + this->check_set_output(identifier, *value.type()); +#endif + output_values_.add_new_by_copy(identifier, value); + } + /** * Store the output value for the given socket identifier. */ |