Blender V4.3
blender::ed::viewer_path Namespace Reference

Classes

struct  ViewerPathForGeometryNodesViewer
 

Enumerations

enum class  UpdateActiveGeometryNodesViewerResult { StillActive , Updated , NotActive }
 

Functions

void activate_geometry_node (Main &bmain, SpaceNode &snode, bNode &node)
 
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)
 
bool add_compute_context_for_viewer_path_elem (const ViewerPathElem &elem, ComputeContextBuilder &compute_context_builder)
 
static ViewerPathElemviewer_path_elem_for_zone (const bNodeTreeZone &zone)
 
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 66 of file ED_viewer_path.hh.

Function Documentation

◆ activate_geometry_node()

◆ add_compute_context_for_viewer_path_elem()

bool blender::ed::viewer_path::add_compute_context_for_viewer_path_elem ( const ViewerPathElem & elem,
ComputeContextBuilder & compute_context_builder )
nodiscard

Some viewer path elements correspond to compute-contexts. This function converts from the viewer path element to the corresponding compute context if possible.

Returns
False, there is no matching compute context.

Definition at line 488 of file ed_viewer_path.cc.

References blender::ComputeContextBuilder::push(), ViewerPathElem::type, VIEWER_PATH_ELEM_TYPE_FOREACH_GEOMETRY_ELEMENT_ZONE, VIEWER_PATH_ELEM_TYPE_GROUP_NODE, VIEWER_PATH_ELEM_TYPE_ID, VIEWER_PATH_ELEM_TYPE_MODIFIER, VIEWER_PATH_ELEM_TYPE_REPEAT_ZONE, VIEWER_PATH_ELEM_TYPE_SIMULATION_ZONE, and VIEWER_PATH_ELEM_TYPE_VIEWER_NODE.

Referenced by blender::find_side_effect_nodes_for_viewer_path(), and blender::nodes::geo_eval_log::GeoModifierLog::find_viewer_node_log_for_path().

◆ 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 460 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::node_deactivate_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 208 of file ed_viewer_path.cc.

References BLI_listbase_count(), ListBase::first, GS, ID_OB, ViewerPath::path, 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_zone()

◆ viewer_path_for_geometry_node()