NodesGraphHelpersInterface Class Reference

#include <nodesgraph_helpers.h>

Static Public Member Functions

static MAXON_METHOD Result< void > SetOriginal (const nodes::NodesGraphModelRef &graph, const nodes::NodesGraphModelRef &orig)
 
static MAXON_METHOD Result< void > SetOriginal (MutableRoot &graph, const NodesGraphModelRef &orig)
 
static MAXON_METHOD Result< nodes::NodesGraphModelRef > GetOriginal (const nodes::NodesGraphModelRef &graph)
 
static MAXON_METHOD Result< TimeStampGetOriginalModificationStamp (const NodesGraphModelRef &graph)
 
static MAXON_METHOD Result< BoolFindNodesBasedOnAssetId (const GraphNode &startNode, const Id &assetId, const ValueReceiver< const NodeWithAssetId & > &recv)
 

Private Member Functions

 MAXON_INTERFACE_NONVIRTUAL (NodesGraphHelpersInterface, MAXON_REFERENCE_STATIC, "net.maxon.interface.nodesgraphhelpers", MAXON_IMPLEMENTATION_MODULE("net.maxon.nodes"))
 

Member Function Documentation

◆ MAXON_INTERFACE_NONVIRTUAL()

MAXON_INTERFACE_NONVIRTUAL ( NodesGraphHelpersInterface  ,
MAXON_REFERENCE_STATIC  ,
"net.maxon.interface.nodesgraphhelpers"  ,
MAXON_IMPLEMENTATION_MODULE("net.maxon.nodes")   
)
private

◆ SetOriginal() [1/2]

static MAXON_METHOD Result<void> SetOriginal ( const nodes::NodesGraphModelRef &  graph,
const nodes::NodesGraphModelRef &  orig 
)
static

Sets the original graph of a graph clone. This method has to be called for clones for previews or renderings so that compiler messages can be passed to the original (which is the one the user edits).

Parameters
[in]graphClone of orig.
[in]origOriginal user-accessible graph.

◆ SetOriginal() [2/2]

static MAXON_METHOD Result<void> SetOriginal ( MutableRoot graph,
const NodesGraphModelRef &  orig 
)
static

Sets the original graph of a graph clone. This method has to be called for clones for previews or renderings so that compiler messages can be passed to the original (which is the one the user edits).

Parameters
[in]graphThe mutable clone of orig.
[in]origOriginal user-accessible graph.

◆ GetOriginal()

static MAXON_METHOD Result<nodes::NodesGraphModelRef> GetOriginal ( const nodes::NodesGraphModelRef &  graph)
static

Returns the original graph of a graph clone.

Parameters
[in]graphClone of orig.
Returns
Original user-accessible graph.

◆ GetOriginalModificationStamp()

static MAXON_METHOD Result<TimeStamp> GetOriginalModificationStamp ( const NodesGraphModelRef &  graph)
static

Returns the modification stamp of the graph when it was cloned.

Parameters
[in]graphClone of orig.
Returns
The original TimeStamp.

◆ FindNodesBasedOnAssetId()

static MAXON_METHOD Result<Bool> FindNodesBasedOnAssetId ( const GraphNode startNode,
const Id assetId,
const ValueReceiver< const NodeWithAssetId & > &  recv 
)
static

Finds all nodes child of #startNode which are based on a specific node asset. Goal is the same as GraphModelHelper::FindNodesByAssetId, but accounting for multiple or nested base assets.

See also
GraphModelHelper::FindNodesByAssetId.
Parameters
[in]startNodeThe search starting point in the graph. Can be the root node to search a whole graph.
[in]assetIdThe asset identifier to search for.
[in]recvThe callback to process matches.
Returns
Result from #recv.