From 9a32c7130b7c17de54335327d3b75d10f43edca4 Mon Sep 17 00:00:00 2001 From: Jacques Lucke Date: Tue, 19 Jan 2021 16:58:05 +0100 Subject: Geometry Nodes: pass depsgraph to nodes during execution The depsgraph will have to be accessed in an upcoming patch. --- source/blender/nodes/NOD_geometry_exec.hh | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'source/blender/nodes/NOD_geometry_exec.hh') diff --git a/source/blender/nodes/NOD_geometry_exec.hh b/source/blender/nodes/NOD_geometry_exec.hh index f278d6b4107..3820c0f0009 100644 --- a/source/blender/nodes/NOD_geometry_exec.hh +++ b/source/blender/nodes/NOD_geometry_exec.hh @@ -24,6 +24,8 @@ #include "DNA_node_types.h" +struct Depsgraph; + namespace blender::nodes { using bke::BooleanReadAttribute; @@ -54,18 +56,21 @@ class GeoNodeExecParams { GValueMap &output_values_; const PersistentDataHandleMap &handle_map_; const Object *self_object_; + Depsgraph *depsgraph_; public: GeoNodeExecParams(const bNode &node, GValueMap &input_values, GValueMap &output_values, const PersistentDataHandleMap &handle_map, - const Object *self_object) + const Object *self_object, + Depsgraph *depsgraph) : node_(node), input_values_(input_values), output_values_(output_values), handle_map_(handle_map), - self_object_(self_object) + self_object_(self_object), + depsgraph_(depsgraph) { } @@ -163,6 +168,11 @@ class GeoNodeExecParams { return self_object_; } + Depsgraph *depsgraph() const + { + return depsgraph_; + } + /** * Creates a read-only attribute based on node inputs. The method automatically detects which * input with the given name is available. -- cgit v1.2.3