Blender V5.3
NOD_geometry_nodes_gizmos.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2024 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
8
9#pragma once
10
12#include "BLI_function_ref.hh"
14
17
19
20namespace blender {
21
22struct Object;
24struct wmWindowManager;
25
26namespace nodes::gizmos {
27
28namespace ie = inverse_eval;
29
48
55
57
58using ForeachGizmoFn = FunctionRef<void(const Object &object,
59 const NodesModifierData &nmd,
60 const ComputeContext &compute_context,
61 const bNode &gizmo_node,
62 const bNodeSocket &gizmo_socket)>;
63
69 bke::ComputeContextCache &compute_context_cache,
71
72using ForeachGizmoInModifierFn = FunctionRef<void(const ComputeContext &compute_context,
73 const bNode &gizmo_node,
74 const bNodeSocket &gizmo_socket)>;
75
81 const NodesModifierData &nmd,
82 const wmWindowManager &wm,
83 bke::ComputeContextCache &compute_context_cache,
85
91 const bNode &gizmo_node,
92 const bNodeSocket &gizmo_socket,
93 FunctionRef<void(const ComputeContext &context)> fn);
94
99void foreach_socket_on_gizmo_path(const ComputeContext &gizmo_context,
100 const bNode &gizmo_node,
101 const bNodeSocket &gizmo_socket,
102 FunctionRef<void(const ComputeContext &context,
103 const bNodeSocket &socket,
104 const ie::ElemVariant &elem)> fn);
105
110ie::ElemVariant get_editable_gizmo_elem(const ComputeContext &gizmo_context,
111 const bNode &gizmo_node,
112 const bNodeSocket &gizmo_socket);
113
133 Object &object,
136 const ComputeContext &gizmo_context,
137 const bNodeSocket &gizmo_socket,
138 FunctionRef<void(bke::SocketValueVariant &value)> apply_on_gizmo_value_fn);
139
143bool value_node_has_gizmo(const bNodeTree &tree, const bNode &node);
144
145} // namespace nodes::gizmos
146} // namespace blender
#define C
Definition RandGen.cpp:29
bool update_tree_gizmo_propagation(bNodeTree &tree)
bool is_builtin_gizmo_node(const bNode &node)
ie::ElemVariant get_editable_gizmo_elem(const ComputeContext &gizmo_context, const bNode &gizmo_node, const bNodeSocket &gizmo_socket)
void foreach_socket_on_gizmo_path(const ComputeContext &gizmo_context, const bNode &gizmo_node, const bNodeSocket &gizmo_socket, FunctionRef< void(const ComputeContext &context, const bNodeSocket &socket, const ie::ElemVariant &elem)> fn)
void foreach_active_gizmo(const bContext &C, bke::ComputeContextCache &compute_context_cache, const ForeachGizmoFn fn)
void foreach_active_gizmo_in_modifier(const Object &object, const NodesModifierData &nmd, const wmWindowManager &wm, bke::ComputeContextCache &compute_context_cache, const ForeachGizmoInModifierFn fn)
void apply_gizmo_change(bContext &C, Object &object, NodesModifierData &nmd, eval_log::NodesEvalLog &eval_log, const ComputeContext &gizmo_context, const bNodeSocket &gizmo_socket, const FunctionRef< void(bke::SocketValueVariant &value)> apply_on_gizmo_value_fn)
FunctionRef< void(const Object &object, const NodesModifierData &nmd, const ComputeContext &compute_context, const bNode &gizmo_node, const bNodeSocket &gizmo_socket)> ForeachGizmoFn
void foreach_compute_context_on_gizmo_path(const ComputeContext &gizmo_context, const bNode &gizmo_node, const bNodeSocket &gizmo_socket, FunctionRef< void(const ComputeContext &context)> fn)
bool value_node_has_gizmo(const bNodeTree &tree, const bNode &node)
FunctionRef< void(const ComputeContext &compute_context, const bNode &gizmo_node, const bNodeSocket &gizmo_socket)> ForeachGizmoInModifierFn
BMesh Iterators.
friend bool operator==(const TreeGizmoPropagation &a, const TreeGizmoPropagation &b)=default
MultiValueMap< ie::SocketElem, ie::SocketElem > gizmo_inputs_by_node_inputs
MultiValueMap< ie::GroupInputElem, ie::SocketElem > gizmo_inputs_by_group_inputs
MultiValueMap< ie::ValueNodeElem, ie::SocketElem > gizmo_inputs_by_value_nodes