[Bf-blender-cvs] [07e201ec13e] master: Geometry Nodes: add assert to check if node supports lazyness

Iliay Katueshenock noreply at git.blender.org
Thu Jul 28 13:39:50 CEST 2022


Commit: 07e201ec13e6cb41ff2d251a825c3e77a38dba12
Author: Iliay Katueshenock
Date:   Thu Jul 28 13:38:12 2022 +0200
Branches: master
https://developer.blender.org/rB07e201ec13e6cb41ff2d251a825c3e77a38dba12

Geometry Nodes: add assert to check if node supports lazyness

Only nodes supporting lazyness can mark inputs as unused. For other
nodes, this is done automatically of all outputs are unused.

Differential Revision: https://developer.blender.org/D15409

===================================================================

M	source/blender/modifiers/intern/MOD_nodes_evaluator.cc

===================================================================

diff --git a/source/blender/modifiers/intern/MOD_nodes_evaluator.cc b/source/blender/modifiers/intern/MOD_nodes_evaluator.cc
index e43d2b4ad85..5cf4e21ea68 100644
--- a/source/blender/modifiers/intern/MOD_nodes_evaluator.cc
+++ b/source/blender/modifiers/intern/MOD_nodes_evaluator.cc
@@ -1863,6 +1863,7 @@ bool NodeParamsProvider::lazy_require_input(StringRef identifier)
 
 void NodeParamsProvider::set_input_unused(StringRef identifier)
 {
+  BLI_assert(node_supports_laziness(this->dnode));
   const DInputSocket socket = this->dnode.input_by_identifier(identifier);
   BLI_assert(socket);



More information about the Bf-blender-cvs mailing list