|
Blender V5.0
|
Classes | |
| struct | TreeGizmoPropagation |
Typedefs | |
| using | ForeachGizmoFn |
| using | ForeachGizmoInModifierFn |
Definition at line 56 of file NOD_geometry_nodes_gizmos.hh.
Definition at line 70 of file NOD_geometry_nodes_gizmos.hh.
| void blender::nodes::gizmos::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 ) |
Definition at line 516 of file geometry_nodes_gizmos.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), C, blender::nodes::geo_eval_log::GeoNodesLog::get_tree_log(), and blender::ComputeContext::hash().
Referenced by blender::ed::view3d::geometry_nodes_gizmos::WIDGETGROUP_geometry_nodes_refresh().
| void blender::nodes::gizmos::apply_gizmo_change | ( | bContext & | C, |
| Object & | object, | ||
| NodesModifierData & | nmd, | ||
| geo_eval_log::GeoNodesLog & | eval_log, | ||
| const ComputeContext & | gizmo_context, | ||
| const bNodeSocket & | gizmo_socket, | ||
| FunctionRef< void(bke::SocketValueVariant &value)> | apply_on_gizmo_value_fn ) |
Should be called when a gizmo is moved and the change should be propagated back to the right place.
| C | The context the gizmo is changed in. Required for propagating updates correctly. |
| object | The object with the modifier that the gizmo belongs to. |
| nmd | The modifier that the gizmo belongs to. |
| eval_log | The logged evaluation data that should be used to compute the backpropagated value. This may not be the most recent logged data, because generally the same logged data is used while interacting with a gizmo. |
| gizmo_context | The compute context of the gizmo node whose gizmo is modified. |
| gizmo_socket | The gizmo socket whose gizmo is modified. |
| apply_on_gizmo_value_fn | Applies the change done to the gizmo to the value in the gizmo node. For example, if an arrow gizmo is moved, the distance it's moved is added to the socket value. This is a callback because gizmo sockets are multi-inputs and thus multiple values need to change. |
|
static |
Definition at line 72 of file geometry_nodes_gizmos.cc.
References MultiValueMap< Key, Value >::add(), Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), blender::Vector< T, InlineBufferCapacity, Allocator >::append(), Vector< T, InlineBufferCapacity, Allocator >::append(), BLI_assert, get_gizmo_socket_elem(), blender::nodes::gizmos::TreeGizmoPropagation::gizmo_endpoint_sockets, blender::nodes::gizmos::TreeGizmoPropagation::gizmo_inputs_by_group_inputs, blender::nodes::gizmos::TreeGizmoPropagation::gizmo_inputs_by_node_inputs, blender::nodes::gizmos::TreeGizmoPropagation::gizmo_inputs_by_value_nodes, blender::nodes::gizmos::TreeGizmoPropagation::gizmo_nodes, is_builtin_gizmo_node(), MultiValueMap< Key, Value >::keys(), bNodeTree::runtime, and tree.
Referenced by update_tree_gizmo_propagation().
| void blender::nodes::gizmos::foreach_active_gizmo | ( | const bContext & | C, |
| bke::ComputeContextCache & | compute_context_cache, | ||
| ForeachGizmoFn | fn ) |
Calls the given function for each gizmo that is active. It scans open node editors for selected or pinned gizmos and also finds the gizmos for the active object.
Definition at line 440 of file geometry_nodes_gizmos.cc.
References BASE_SELECTED, BKE_object_active_modifier(), C, CTX_data_active_base(), CTX_wm_manager(), eModifierMode_Realtime, eModifierType_Nodes, foreach_active_gizmo_exposed_to_modifier(), and foreach_active_gizmo_in_open_editors().
Referenced by blender::ed::space_node::find_sockets_on_active_gizmo_paths(), and blender::ed::view3d::geometry_nodes_gizmos::WIDGETGROUP_geometry_nodes_refresh().
|
static |
Definition at line 370 of file geometry_nodes_gizmos.cc.
References blender::bke::ComputeContextCache::for_modifier(), foreach_gizmo_for_input(), blender::nodes::get_geometry_nodes_input_inference_values(), blender::nodes::socket_usage_inference::SocketUsageInferencer::is_group_input_used(), NodesModifierData::node_group, NodesModifierSettings::properties, NodesModifierData::settings, and tree.
Referenced by foreach_active_gizmo(), and foreach_active_gizmo_in_modifier().
| void blender::nodes::gizmos::foreach_active_gizmo_in_modifier | ( | const Object & | object, |
| const NodesModifierData & | nmd, | ||
| const wmWindowManager & | wm, | ||
| bke::ComputeContextCache & | compute_context_cache, | ||
| ForeachGizmoInModifierFn | fn ) |
Similar to foreach_active_gizmo but filters the list of gizmos to those that are relevant for a specific modifier evaluation.
Definition at line 412 of file geometry_nodes_gizmos.cc.
References BLI_assert, foreach_active_gizmo_exposed_to_modifier(), foreach_active_gizmo_in_open_editors(), NodesModifierData::node_group, and UNUSED_VARS_NDEBUG.
Referenced by blender::find_side_effect_nodes_for_active_gizmos().
|
static |
Definition at line 340 of file geometry_nodes_gizmos.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), bScreen::areabase, BKE_workspace_active_screen_get(), ELEM, ListBase::first, foreach_active_gizmo_in_open_node_editor(), ScrArea::full, LISTBASE_FOREACH, SCREENFULL, SCREENMAXIMIZED, SPACE_NODE, SpaceLink::spacetype, and bScreen::state.
Referenced by foreach_active_gizmo(), and foreach_active_gizmo_in_modifier().
|
static |
Definition at line 237 of file geometry_nodes_gizmos.cc.
References blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_multiple(), blender::ed::space_node::compute_context_for_edittree(), SpaceNode::edittree, eModifierMode_Realtime, bNode::flag, bNodeSocket::flag, foreach_gizmo_for_input(), blender::ed::space_node::get_modifier_for_node_editor(), blender::nodes::gizmos::TreeGizmoPropagation::gizmo_inputs_by_node_inputs, blender::nodes::gizmos::TreeGizmoPropagation::gizmo_inputs_by_value_nodes, blender::nodes::gizmos::TreeGizmoPropagation::gizmo_nodes, MultiValueMap< Key, Value >::items(), ModifierData::mode, NodesModifierData::modifier, NODE_SELECT, SpaceNode::nodetree, bNodeTree::runtime, SOCK_GIZMO_PIN, and bNodeSocket::type.
Referenced by foreach_active_gizmo_in_open_editors().
| void blender::nodes::gizmos::foreach_compute_context_on_gizmo_path | ( | const ComputeContext & | gizmo_context, |
| const bNode & | gizmo_node, | ||
| const bNodeSocket & | gizmo_socket, | ||
| FunctionRef< void(const ComputeContext &context)> | fn ) |
Iterates over all compute contexts that are touched by a specific gizmo back-propagation path. This is used to make sure that all sockets on the path are logged.
Definition at line 475 of file geometry_nodes_gizmos.cc.
References get_gizmo_socket_elem().
Referenced by blender::find_side_effect_nodes_for_active_gizmos().
|
static |
Definition at line 185 of file geometry_nodes_gizmos.cc.
References foreach_gizmo_for_input(), blender::nodes::gizmos::TreeGizmoPropagation::gizmo_inputs_by_group_inputs, MultiValueMap< Key, Value >::lookup(), and tree.
Referenced by foreach_gizmo_for_input().
|
static |
Definition at line 199 of file geometry_nodes_gizmos.cc.
References blender::bke::ComputeContextCache::for_group_node(), foreach_gizmo_for_group_input(), blender::bke::bNodeTreeZones::get_zone_by_node(), bNode::id, bNode::identifier, is_builtin_gizmo_node(), and tree.
Referenced by foreach_active_gizmo_exposed_to_modifier(), foreach_active_gizmo_in_open_node_editor(), and foreach_gizmo_for_group_input().
| void blender::nodes::gizmos::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 ) |
Iterates over all sockets that propagate values modified by gizmos backwards. This is used to draw the links between those sockets in a special way.
Definition at line 484 of file geometry_nodes_gizmos.cc.
References get_gizmo_socket_elem().
Referenced by blender::ed::space_node::find_sockets_on_active_gizmo_paths().
| ie::ElemVariant blender::nodes::gizmos::get_editable_gizmo_elem | ( | const ComputeContext & | gizmo_context, |
| const bNode & | gizmo_node, | ||
| const bNodeSocket & | gizmo_socket ) |
Get the value element of a gizmo socket that can be affected by a gizmo. E.g. for the Transform Gizmo node this may report that only the rotation component can be controlled with the gizmo.
Definition at line 495 of file geometry_nodes_gizmos.cc.
References BLI_assert, get_gizmo_socket_elem(), blender::ComputeContext::hash(), and bNodeSocket::type.
Referenced by blender::ed::view3d::geometry_nodes_gizmos::WIDGETGROUP_geometry_nodes_refresh().
|
static |
Get the part of a socket value that may be edited with gizmos.
Definition at line 39 of file geometry_nodes_gizmos.cc.
References BLI_assert_unreachable, GEO_NODE_GIZMO_DIAL, GEO_NODE_GIZMO_LINEAR, GEO_NODE_GIZMO_TRANSFORM, GEO_NODE_TRANSFORM_GIZMO_USE_ROTATION_ALL, GEO_NODE_TRANSFORM_GIZMO_USE_SCALE_ALL, GEO_NODE_TRANSFORM_GIZMO_USE_TRANSLATION_ALL, bNode::storage, bNodeSocket::type, and bNode::type_legacy.
Referenced by build_tree_gizmo_propagation(), foreach_compute_context_on_gizmo_path(), foreach_socket_on_gizmo_path(), and get_editable_gizmo_elem().
| bool blender::nodes::gizmos::is_builtin_gizmo_node | ( | const bNode & | node | ) |
Definition at line 30 of file geometry_nodes_gizmos.cc.
References ELEM, GEO_NODE_GIZMO_DIAL, GEO_NODE_GIZMO_LINEAR, GEO_NODE_GIZMO_TRANSFORM, and bNode::type_legacy.
Referenced by build_tree_gizmo_propagation(), foreach_gizmo_for_input(), and blender::ed::space_node::std_node_socket_draw().
| bool blender::nodes::gizmos::update_tree_gizmo_propagation | ( | bNodeTree & | tree | ) |
Updates the TreeGizmoPropagation cached on the node-tree.
Definition at line 160 of file geometry_nodes_gizmos.cc.
References build_tree_gizmo_propagation(), and tree.
Returns true if the value if the given node is controlled by a gizmo.
Definition at line 559 of file geometry_nodes_gizmos.cc.
References BLI_assert, blender::nodes::partial_eval::is_supported_value_node(), and tree.
Referenced by blender::nodes::node_fn_input_bool_cc::node_declare(), blender::nodes::node_fn_input_int_cc::node_declare(), blender::nodes::node_fn_input_rotation_cc::node_declare(), blender::nodes::node_fn_input_vector_cc::node_declare(), and blender::nodes::node_shader_value_cc::sh_node_value_declare().