Blender V5.0
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
5#pragma once
6
8#include "BLI_function_ref.hh"
10
13
15
16struct Object;
18struct wmWindowManager;
19
20namespace blender::nodes::gizmos {
21
22namespace ie = inverse_eval;
23
46
53
54bool is_builtin_gizmo_node(const bNode &node);
55
56using ForeachGizmoFn = FunctionRef<void(const Object &object,
57 const NodesModifierData &nmd,
58 const ComputeContext &compute_context,
59 const bNode &gizmo_node,
60 const bNodeSocket &gizmo_socket)>;
61
67 bke::ComputeContextCache &compute_context_cache,
69
70using ForeachGizmoInModifierFn = FunctionRef<void(const ComputeContext &compute_context,
71 const bNode &gizmo_node,
72 const bNodeSocket &gizmo_socket)>;
73
79 const NodesModifierData &nmd,
80 const wmWindowManager &wm,
81 bke::ComputeContextCache &compute_context_cache,
83
89 const bNode &gizmo_node,
90 const bNodeSocket &gizmo_socket,
91 FunctionRef<void(const ComputeContext &context)> fn);
92
97void foreach_socket_on_gizmo_path(const ComputeContext &gizmo_context,
98 const bNode &gizmo_node,
99 const bNodeSocket &gizmo_socket,
100 FunctionRef<void(const ComputeContext &context,
101 const bNodeSocket &socket,
102 const ie::ElemVariant &elem)> fn);
103
108ie::ElemVariant get_editable_gizmo_elem(const ComputeContext &gizmo_context,
109 const bNode &gizmo_node,
110 const bNodeSocket &gizmo_socket);
111
131 Object &object,
134 const ComputeContext &gizmo_context,
135 const bNodeSocket &gizmo_socket,
136 FunctionRef<void(bke::SocketValueVariant &value)> apply_on_gizmo_value_fn);
137
141bool value_node_has_gizmo(const bNodeTree &tree, const bNode &node);
142
143} // namespace blender::nodes::gizmos
#define BLI_STRUCT_EQUALITY_OPERATORS_4(Type, m1, m2, m3, m4)
#define C
Definition RandGen.cpp:29
KDTree_3d * tree
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 apply_gizmo_change(bContext &C, Object &object, NodesModifierData &nmd, geo_eval_log::GeoNodesLog &eval_log, const ComputeContext &gizmo_context, const bNodeSocket &gizmo_socket, const FunctionRef< void(bke::SocketValueVariant &value)> apply_on_gizmo_value_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)
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
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