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>2020-12-18 15:28:43 +0300
committerJacques Lucke <jacques@blender.org>2020-12-18 15:28:55 +0300
commitc5569ba140382015c32bd638532097ea05168607 (patch)
tree49c6930453534243e1fe5e7f7a88f1b9144e938b /source/blender/nodes
parent79d6bd9a227f9c07b2a1c3e55d9e06d8b8306f39 (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.hh11
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.
*/