Blender V5.3
blender::bke::bNodeTreeZones Class Reference

#include <BKE_node_tree_zones.hh>

Public Member Functions

Vector< const bNode * > nodes_outside_zones () const
const bNodeTreeZone * get_zone_by_socket (const bNodeSocket &socket) const
const bNodeTreeZone * get_zone_by_node (const int32_t node_id) const
bool link_between_zones_is_allowed (const bNodeTreeZone *from_zone, const bNodeTreeZone *to_zone) const
bool link_between_sockets_is_allowed (const bNodeSocket &from, const bNodeSocket &to) const
Vector< const bNodeTreeZone * > get_zones_to_enter (const bNodeTreeZone *outer_zone, const bNodeTreeZone *inner_zone) const
Vector< const bNodeTreeZone * > get_zones_to_enter_from_root (const bNodeTreeZone *zone) const

Public Attributes

const bNodeTree * tree = nullptr
Vector< std::unique_ptr< bNodeTreeZone > > zones_ptrs
Vector< bNodeTreeZone * > zones
Vector< bNodeTreeZone * > root_zones
Vector< int > node_ids_outside_zones
Map< int, int > zone_by_node_id

Friends

std::ostream & operator<< (std::ostream &stream, const bNodeTreeZones &zones)

Detailed Description

Definition at line 57 of file BKE_node_tree_zones.hh.

Member Function Documentation

◆ get_zone_by_node()

const bNodeTreeZone * blender::bke::bNodeTreeZones::get_zone_by_node ( const int32_t node_id) const

Get the deepest zone that the node is in. Note that the e.g. Simulation Input and Output nodes are considered to be inside of the zone they create.

Definition at line 437 of file node_tree_zones.cc.

References blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_default(), zone_by_node_id, and zones.

Referenced by blender::ed::space_node::compute_context_for_edittree_node(), blender::ed::space_node::compute_context_for_tree_path(), blender::compositor::compute_output_reference_count(), blender::compositor::NodeTreeEvaluator::evaluate(), blender::ed::viewer_path::exists_geometry_nodes_viewer(), blender::compositor::find_dependency_nodes(), blender::find_side_effect_nodes_for_nested_node(), blender::nodes::find_target_sockets_through_contexts(), blender::nodes::gizmos::foreach_gizmo_for_input(), blender::nodes::socket_items::ops::get_active_node_to_operate_on(), blender::nodes::eval_log::ContextualNodeTreeLogs::get_main_tree_log(), blender::get_node_code_gen_order(), blender::compositor::get_output_nodes(), blender::compositor::NodeTreeEvaluator::get_result_from_output_socket(), get_zone_by_socket(), blender::bke::node_tree_reference_lifetimes::get_zone_of_node_if_full(), blender::bke::compositor::get_zone_viewer_compute_context(), blender::ed::space_node::node_add_error_message_button(), blender::ed::space_node::node_get_execution_time(), blender::nodes::node_geo_closure_cc::node_layout_ex(), blender::nodes::node_geo_foreach_geometry_element_cc::node_layout_ex(), blender::nodes::node_geo_repeat_cc::node_layout_ex(), blender::nodes::node_geo_simulation_cc::node_layout_ex(), and blender::try_add_side_effect_node().

◆ get_zone_by_socket()

◆ get_zones_to_enter()

◆ get_zones_to_enter_from_root()

Vector< const bNodeTreeZone * > blender::bke::bNodeTreeZones::get_zones_to_enter_from_root ( const bNodeTreeZone * zone) const

◆ link_between_sockets_is_allowed()

bool blender::bke::bNodeTreeZones::link_between_sockets_is_allowed ( const bNodeSocket & from,
const bNodeSocket & to ) const

Check if a link between the given sockets is allowed. It's not allowed if link would go from an inner zone to an outer zone.

Definition at line 464 of file node_tree_zones.cc.

References blender::BLI_assert(), get_zone_by_socket(), blender::bNodeSocket::in_out, link_between_zones_is_allowed(), blender::SOCK_IN, and blender::SOCK_OUT.

◆ link_between_zones_is_allowed()

bool blender::bke::bNodeTreeZones::link_between_zones_is_allowed ( const bNodeTreeZone * from_zone,
const bNodeTreeZone * to_zone ) const

Check if a link from the first zone to a socket in the second zone is allowed. Either zone input may also be null which represents the root tree outside of any zone. Generally, a link can only go into zones, but not out of zones.

Definition at line 446 of file node_tree_zones.cc.

References blender::bke::bNodeTreeZone::contains_zone_recursively().

Referenced by blender::nodes::find_origin_sockets_through_contexts(), blender::nodes::find_target_sockets_through_contexts(), get_zones_to_enter(), and link_between_sockets_is_allowed().

◆ nodes_outside_zones()

Vector< const bNode * > blender::bke::bNodeTreeZones::nodes_outside_zones ( ) const

◆ operator<<

std::ostream & operator<< ( std::ostream & stream,
const bNodeTreeZones & zones )
friend

Definition at line 620 of file node_tree_zones.cc.

References operator<<, and zones.

Referenced by operator<<.

Member Data Documentation

◆ node_ids_outside_zones

Vector<int> blender::bke::bNodeTreeZones::node_ids_outside_zones

Definition at line 64 of file BKE_node_tree_zones.hh.

Referenced by nodes_outside_zones().

◆ root_zones

Vector<bNodeTreeZone *> blender::bke::bNodeTreeZones::root_zones

◆ tree

◆ zone_by_node_id

Map<int, int> blender::bke::bNodeTreeZones::zone_by_node_id

Zone index by node. Nodes that are in no zone, are not included. Nodes that are at the border of a zone (e.g. Simulation Input) are mapped to the zone they create.

Definition at line 69 of file BKE_node_tree_zones.hh.

Referenced by blender::bke::bNodeTreeZone::contains_node_recursively(), and get_zone_by_node().

◆ zones

◆ zones_ptrs

Vector<std::unique_ptr<bNodeTreeZone> > blender::bke::bNodeTreeZones::zones_ptrs

Definition at line 60 of file BKE_node_tree_zones.hh.


The documentation for this class was generated from the following files: