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

#include <BKE_node_tree_zones.hh>

Public Member Functions

Vector< const bNode * > nodes_outside_zones () const
const bNodeTreeZoneget_zone_by_socket (const bNodeSocket &socket) const
const bNodeTreeZoneget_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 bNodeTreetree = 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 56 of file BKE_node_tree_zones.hh.

Member Function Documentation

◆ get_zone_by_node()

◆ get_zone_by_socket()

◆ get_zones_to_enter()

Vector< const bNodeTreeZone * > blender::bke::bNodeTreeZones::get_zones_to_enter ( const bNodeTreeZone * outer_zone,
const bNodeTreeZone * inner_zone ) const

◆ 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 461 of file node_tree_zones.cc.

References BLI_assert, get_zone_by_socket(), bNodeSocket::in_out, link_between_zones_is_allowed(), SOCK_IN, and 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 443 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 616 of file node_tree_zones.cc.

References zones.

Member Data Documentation

◆ node_ids_outside_zones

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

Definition at line 63 of file BKE_node_tree_zones.hh.

Referenced by nodes_outside_zones().

◆ root_zones

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

◆ tree

const bNodeTree* blender::bke::bNodeTreeZones::tree = nullptr

Definition at line 58 of file BKE_node_tree_zones.hh.

Referenced by nodes_outside_zones().

◆ 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 68 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 59 of file BKE_node_tree_zones.hh.


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