Blender V5.0
blender::ed::viewer_path Namespace Reference

Classes

struct  ViewerPathForGeometryNodesViewer
class  bNodeTreeZone
class  bNodeTreeZones

Enumerations

enum class  UpdateActiveGeometryNodesViewerResult { StillActive , Updated , NotActive }

Functions

void activate_geometry_node (Main &bmain, SpaceNode &snode, bNode &node, std::optional< int > item_identifier=std::nullopt)
Objectparse_object_only (const ViewerPath &viewer_path)
std::optional< ViewerPathForGeometryNodesViewerparse_geometry_nodes_viewer (const ViewerPath &viewer_path)
bNodefind_geometry_nodes_viewer (const ViewerPath &viewer_path, SpaceNode &snode)
bool exists_geometry_nodes_viewer (const ViewerPathForGeometryNodesViewer &parsed_viewer_path)
UpdateActiveGeometryNodesViewerResult update_active_geometry_nodes_viewer (const bContext &C, ViewerPath &viewer_path)
const ComputeContextcompute_context_for_viewer_path_elem (const ViewerPathElem &elem, bke::ComputeContextCache &compute_context_cache, const ComputeContext *parent_compute_context)
ViewerPathElemviewer_path_elem_for_compute_context (const ComputeContext &compute_context)
static void viewer_path_for_geometry_node (const SpaceNode &snode, const bNode &node, ViewerPath &r_dst)

Enumeration Type Documentation

◆ UpdateActiveGeometryNodesViewerResult

Enumerator
StillActive 
Updated 
NotActive 

Definition at line 72 of file ED_viewer_path.hh.

Function Documentation

◆ activate_geometry_node()

void blender::ed::viewer_path::activate_geometry_node ( Main & bmain,
SpaceNode & snode,
bNode & node,
std::optional< int > item_identifier = std::nullopt )

◆ compute_context_for_viewer_path_elem()

◆ exists_geometry_nodes_viewer()

◆ find_geometry_nodes_viewer()

bNode * blender::ed::viewer_path::find_geometry_nodes_viewer ( const ViewerPath & viewer_path,
SpaceNode & snode )

Finds the node referenced by the ViewerPath within the provided editor. If no node is referenced, null is returned. When two different editors show the same node group but in a different context, it's possible that the same node is active in one editor but not the other.

Definition at line 486 of file ed_viewer_path.cc.

References BKE_viewer_path_clear(), BKE_viewer_path_equal(), BLI_SCOPED_DEFER, SpaceNode::edittree, GS, SpaceNode::id, ID_OB, ID::name, parse_geometry_nodes_viewer(), and viewer_path_for_geometry_node().

Referenced by blender::ed::space_node::draw_nodetree(), blender::ed::space_node::node_deactivate_viewer_exec(), and blender::ed::space_node::node_toggle_viewer_exec().

◆ parse_geometry_nodes_viewer()

◆ parse_object_only()

Object * blender::ed::viewer_path::parse_object_only ( const ViewerPath & viewer_path)

Returns the object referenced by the viewer path. This only returns something if the viewer path only contains the object and nothing more.

Definition at line 200 of file ed_viewer_path.cc.

References BLI_listbase_count(), GS, ID_OB, ID::name, ViewerPathElem::type, and VIEWER_PATH_ELEM_TYPE_ID.

Referenced by blender::ed::spreadsheet::spreadsheet_update_context().

◆ update_active_geometry_nodes_viewer()

◆ viewer_path_elem_for_compute_context()

◆ viewer_path_for_geometry_node()