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 ::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< ::BaseList2D * > UuidToBaseList2D (const Uuid &uuid) const
 
MAXON_METHOD Result< UuidBaseList2DToUuid (::BaseList2D *object) const
 
MAXON_METHOD Result< void > GetDescID (const NodePath &port, ::DescID &result)
 
MAXON_METHOD ::BaseList2DFindCorrespondingBaseList (const NodePath &absolutePath) const
 
MAXON_METHOD Result< ::BaseList2D * > FindOrCreateCorrespondingBaseList (const NodePath &absolutePath)
 

Static Public Member Functions

static MAXON_METHOD Result< GraphNodeGetGraphNodeFromBaseList (const ::BaseList2D *bl)
 
static MAXON_METHOD Result< NodePath > GetNodePathFromBaseList (const ::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 ::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< ::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 ( ::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,
::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 ::BaseList2D* FindCorrespondingBaseList ( const NodePath &  absolutePath) const

@MAXON_ANNOTATION{methodId="FindCorrespondingBaseList@2d99e15f328cbcb"->"FindCorrespondingBaseList@6b9eb1b2861654f3"}

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< ::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. @MAXON_ANNOTATION{methodId="FindOrCreateCorrespondingBaseList@a100eb2772c8f470"->"FindOrCreateCorrespondingBaseList@bd9278ce4d3edb04"}

◆ GetGraphNodeFromBaseList()

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

Returns the node connected to the BaseList2D element.

Returns
GraphNode on success. @MAXON_ANNOTATION{methodId="GetGraphNodeFromBaseList@6b0dfc21148e2122"->"GetGraphNodeFromBaseList@72780fd07b2bfeae"}

◆ GetNodePathFromBaseList()

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

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

Returns
GraphNode on success. @MAXON_ANNOTATION{methodId="GetNodePathFromBaseList@8edc15bb8b8afd25"->"GetNodePathFromBaseList@80732c87ed8c8cbd"}