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>2021-11-03 12:54:17 +0300
committerJacques Lucke <jacques@blender.org>2021-11-03 12:54:17 +0300
commitb55bddde40db3eda3531d98caa99be9a8e88a8ee (patch)
tree1a4688fba2f4ecb68ad6e4838da6895da352ed1d /source/blender/nodes/NOD_derived_node_tree.hh
parent2b12b4cd7dccfa51cec53d5ae885a2142563fb17 (diff)
Fix T91862: do type conversion when data enters or exists node group
The geometry node evaluator now has access to the entire socket path from the node that produces a value to the node that uses it. This allows the evaluator to make decisions about at which points in the path the value should be converted. Multiple conversions may be necessary under some circumstances with nested node groups. Differential Revision: https://developer.blender.org/D13034
Diffstat (limited to 'source/blender/nodes/NOD_derived_node_tree.hh')
-rw-r--r--source/blender/nodes/NOD_derived_node_tree.hh15
1 files changed, 13 insertions, 2 deletions
diff --git a/source/blender/nodes/NOD_derived_node_tree.hh b/source/blender/nodes/NOD_derived_node_tree.hh
index e903e3c9255..895f7ef6d5b 100644
--- a/source/blender/nodes/NOD_derived_node_tree.hh
+++ b/source/blender/nodes/NOD_derived_node_tree.hh
@@ -158,8 +158,19 @@ class DOutputSocket : public DSocket {
DInputSocket get_corresponding_group_node_input() const;
DInputSocket get_active_corresponding_group_output_socket() const;
- void foreach_target_socket(FunctionRef<void(DInputSocket)> target_fn,
- FunctionRef<void(DSocket)> skipped_fn) const;
+ struct TargetSocketPathInfo {
+ /** All sockets on the path from the current to the final target sockets, excluding `this`. */
+ Vector<DSocket, 16> sockets;
+ };
+
+ using ForeachTargetSocketFn =
+ FunctionRef<void(DInputSocket, const TargetSocketPathInfo &path_info)>;
+
+ void foreach_target_socket(ForeachTargetSocketFn target_fn) const;
+
+ private:
+ void foreach_target_socket(ForeachTargetSocketFn target_fn,
+ TargetSocketPathInfo &path_info) const;
};
class DerivedNodeTree {