NimbusBaseInterface Class Reference

#include <nimbusbase.h>

Inheritance diagram for NimbusBaseInterface:

Detailed Description

NimbusBaseRef manages a NodesGraphModelRef that is owned by a classic BaseList2D object. A BaseList2D object can own multiple graphs, one for each node space.

Public Member Functions

MAXON_METHOD const nodes::NodesGraphModelRef & GetGraph ()
 
MAXON_METHOD cinema::BaseList2DGetBaseListRoot ()
 
MAXON_METHOD const IdGetSpaceId ()
 
MAXON_METHOD Result< void > SetPath (NIMBUS_PATH type, const NodePath &path)
 
MAXON_METHOD NodePath GetPath (NIMBUS_PATH type)
 
MAXON_METHOD Result< void > OpenInEditor (const NodePath &path=NodePath::DefaultValue())
 
MAXON_METHOD Result< cinema::BaseList2D * > UuidToBaseList2D (const Uuid &uuid) const
 
MAXON_METHOD Result< UuidBaseList2DToUuid (cinema::BaseList2D *object) const
 
MAXON_METHOD Result< void > GetDescID (const NodePath &port, cinema::DescID &result)
 
MAXON_METHOD cinema::BaseList2DFindCorrespondingBaseList (const NodePath &absolutePath) const
 
MAXON_METHOD Result< cinema::BaseList2D * > FindOrCreateCorrespondingBaseList (const NodePath &absolutePath)
 
MAXON_METHOD Result< void > UpdateGlobalContext ()
 

Static Public Member Functions

static MAXON_METHOD Result< GraphNodeGetGraphNodeFromBaseList (const cinema::BaseList2D *bl)
 
static MAXON_METHOD Result< NodePath > GetNodePathFromBaseList (const cinema::BaseList2D *bl)
 

Private Member Functions

 MAXON_INTERFACE (NimbusBaseInterface, MAXON_REFERENCE_NORMAL, "net.maxon.interface.nimbusbase")
 

Member Function Documentation

◆ MAXON_INTERFACE()

MAXON_INTERFACE ( NimbusBaseInterface  ,
MAXON_REFERENCE_NORMAL  ,
"net.maxon.interface.nimbusbase"   
)
private

◆ GetGraph()

MAXON_METHOD const nodes::NodesGraphModelRef& GetGraph ( )

Returns the node graph connected to this object.

Returns
NodesGraphModelRef on success.

◆ GetBaseListRoot()

MAXON_METHOD cinema::BaseList2D* GetBaseListRoot ( )

Returns the C4D object that holds the NimbusBaseRef.

Returns
BaseList2D element, e.g. a Material.

◆ GetSpaceId()

MAXON_METHOD const Id& GetSpaceId ( )

Returns the identifier of the node space of the node graph.

Returns
Node space identifier.

◆ SetPath()

MAXON_METHOD Result<void> SetPath ( NIMBUS_PATH  type,
const NodePath &  path 
)

Sets a path.

Parameters
[in]typePath type.
[in]pathAbsolute Path to a Node or an empty path.
Returns
OK on success.

◆ GetPath()

MAXON_METHOD NodePath GetPath ( NIMBUS_PATH  type)

Returns a path. Note that the returned path can be invalid and point to a non-existing object.

Parameters
[in]typePath type.
Returns
Absolute Path to a Node or Port, depending on the given type.

◆ OpenInEditor()

MAXON_METHOD Result<void> OpenInEditor ( const NodePath &  path = NodePath::DefaultValue())

Opens the node editor for the node graph held by this NimbusBaseRef.

Parameters
[in]pathAn optional path pointing to a group of the node graph.

◆ UuidToBaseList2D()

MAXON_METHOD Result<cinema::BaseList2D*> UuidToBaseList2D ( const Uuid uuid) const

Returns the BaseList2D element with the given uuid.

Parameters
[in]uuidUuid to find.
Returns
BaseList2D object on success.

◆ BaseList2DToUuid()

MAXON_METHOD Result<Uuid> BaseList2DToUuid ( cinema::BaseList2D object) const

Returns the uuid of the given BaseList2D object.

Parameters
[in]objectBaseList2D object to find.
Returns
Uuid on success.

◆ GetDescID()

MAXON_METHOD Result<void> GetDescID ( const NodePath &  port,
cinema::DescID result 
)

Sets up the DescID of the parameter which corresponds to the given port.

Parameters
[in]portA port path.
[out]resultThe DescID to set up.

◆ FindCorrespondingBaseList()

MAXON_METHOD cinema::BaseList2D* FindCorrespondingBaseList ( const NodePath &  absolutePath) const

Returns the corresponding BaseList element for a GraphNode but will not create one if not already present.

Parameters
[in]absolutePathAbsolute Path to the Node.
Returns
BaseList2D element.

◆ FindOrCreateCorrespondingBaseList()

MAXON_METHOD Result<cinema::BaseList2D*> FindOrCreateCorrespondingBaseList ( const NodePath &  absolutePath)

Returns the corresponding BaseList element for a GraphNode. This function creates a new one if not already present.

Parameters
[in]absolutePathAbsolute Path to the Node.
Returns
BaseList2D element. The return value can be nullptr in case no element can be created for the given path, e.g. if it is invalid of refers to an inner node.

◆ UpdateGlobalContext()

MAXON_METHOD Result<void> UpdateGlobalContext ( )

Updates global context values using the delegates registered at NimbusContextGetters.

◆ GetGraphNodeFromBaseList()

static MAXON_METHOD Result<GraphNode> GetGraphNodeFromBaseList ( const cinema::BaseList2D bl)
static

Returns the node connected to the BaseList2D element.

Returns
GraphNode on success.

◆ GetNodePathFromBaseList()

static MAXON_METHOD Result<NodePath> GetNodePathFromBaseList ( const cinema::BaseList2D bl)
static

Returns the path of the node connected to the BaseList2D element.

Returns
GraphNode on success.