maxon::nodes Namespace Reference

Detailed Description

This namespace contains the API of the nodes framework.

Namespaces

 details
 
 InPortComponentAccessTypes
 
 MATERIALEXCHANGE
 
 MaterialNodeSpaces
 
 NODESPACE
 
 OutPortComponentAccessTypes
 
 PREVIEW
 
 PREVIEWIMAGEREQUEST
 
 PREVIEWIMAGESUBSCRIPTION
 

Classes

struct  Chain
 
class  ComponentAccessType
 
class  DerivedAttributeInterface
 
class  GNode
 
class  GNodeBase
 
struct  GNodeDataPtr
 
class  GNodeFunctions
 
class  GNodeHandle
 
class  GNodeIterator
 
class  GNodeIteratorBase
 
class  GraphSetUndoMode
 
class  ImportAdapterInterface
 
class  MaterialExchangeInterface
 
class  MutableGNode
 
class  MutableGNodeBase
 
class  MutableGNodeFunctions
 
class  MutableNode
 
class  MutableNodeFunctions
 
class  MutablePort
 
class  MutablePortFunctions
 
class  MutablePortList
 
class  MutablePortListFunctions
 
class  MutableRoot
 
class  Node
 
class  NodeErrorInterface
 
class  NodeFunctions
 
class  NodeMaterialExportInterface
 
class  NodeMaterialImportHelperInterface
 
class  NodeMaterialImportInterface
 
class  NodeOrTemplate
 
class  NodesGraphHelpersInterface
 
class  NodesGraphModelInterface
 
class  NodesLib
 
class  NodeSpaceHelpersInterface
 
class  NodeSpaceInterface
 
class  NodeSystemBasedNodeTemplateInterface
 
class  NodeSystemClassInterface
 
class  NodeSystemDataInterface
 
class  NodeSystemDerivationHandlerInterface
 
class  NodeSystemInterface
 
class  NodeSystemManagerInterface
 
class  NodeTemplateArgumentErrorInterface
 
class  NodeTemplateInterface
 
struct  PackedMaterialParameter
 
class  Port
 
class  PortFunctions
 
class  PortList
 
class  PortListFunctions
 
class  PreviewImageProviderInterface
 
struct  PreviewImageProviderOutput
 
struct  PreviewImageProviderOutputImage
 
class  PreviewImageSubscriptionInterface
 
class  SerializationNodeData
 
class  TemplateArguments
 
struct  TypedMaterialParameter
 

Typedefs

using LanguageDictionary = DataDictionary
 
using PortDescriptionProvider = Delegate< Result< void >(DataDictionary &description, const GraphNode &port, const Id &category)>
 
using ConstantOptimizer = Delegate< Result< Data >(const ConstDataPtr &value)>
 
using OriginalGraph = Tuple< nodes::NodesGraphModelRef, TimeStamp >
 
template<Bool MUTABLE>
using GNodeSelector = typename std::conditional< MUTABLE, MutableGNode, GNode >::type
 
template<Bool MUTABLE>
using PortListSelector = typename std::conditional< MUTABLE, MutablePortList, PortList >::type
 
template<Bool MUTABLE>
using PortSelector = typename std::conditional< MUTABLE, MutablePort, Port >::type
 
using Connection = Tuple< Port, Wires >
 
using MutableConnection = Tuple< MutablePort, Wires >
 
template<Bool MUTABLE>
using ConnectionSelector = typename std::conditional< MUTABLE, MutableConnection, Connection >::type
 
template<Bool MUTABLE>
using NodeSelector = typename std::conditional< MUTABLE, MutableNode, Node >::type
 
template<typename BASE >
using PortFunctionsSuper = typename std::conditional< BASE::HAS_ERROR, typename std::conditional< BASE::MUTABLE, MutablePortListFunctions< BASE >, PortListFunctions< BASE > >::type, PortListSelector< BASE::MUTABLE > >::type
 
using NodePathArraySet = ArraySet< NodePath, true, FastNodePathHash >
 
using NodePathArraySetRef = StrongCOWRef< NodePathArraySet >
 
using SampleFloat32 = Vec4< Float32 >
 
using SamplesFloat32 = BaseArray< SampleFloat32 >
 
using SamplesFloat32Ref = StrongRef< SamplesFloat32 >
 
using SamplesFloat32ConstRef = StrongRef< const SamplesFloat32 >
 
using PreviewImageSubscriptionResultFunc = Delegate< void(PREVIEW::STAGE stage, const ImageTextureRef &image)>
 

Enumerations

enum  PORT_CONNECTION_STATE {
  NONE,
  SAME_LEVEL,
  OUTER_LEVEL,
  PROPAGATED,
  AUTO_PROPAGATED,
  NORMAL_MASK,
  PROPAGATED_MASK
}
 
enum  GNODE_FLAGS : UInt64 {
  NONE,
  DIRECT_PORT,
  DERIVED_PORT_INHERITED,
  DERIVED_PORT_SYNTHESIZED,
  CONTEXT_SOURCE,
  CONTEXT_TARGET,
  FUNCTION_INSTANTIATION,
  CONTEXT_PARAMETER_PORT,
  TAPPING_PORT,
  DERIVATION_FILTER_SOURCE,
  DERIVATION_FILTER_TARGET,
  ALL_MASK
}
 
enum  VALUEMODE : Char {
  NONE,
  DYNAMIC,
  CONSTANT
}
 
enum  PORT_FLAGS {
  NONE,
  HIDDEN,
  USED_FOR_TEMPLATE_ARGUMENT,
  USED_FOR_INPUTPORTTYPE_TEMPLATE_ARGUMENT,
  CONSTANT,
  VARIADIC,
  VARIADIC_TEMPLATE,
  INHERITS_NESTED_PORTS,
  SYNTHESIZES_NESTED_PORTS,
  HAS_CHILDREN,
  USED_FOR_INPUTBUNDLE_TEMPLATE_ARGUMENT,
  CHAIN,
  DYNAMIC
}
 
enum  UNDO_MODE {
  NONE,
  START,
  ADD
}
 

Functions

 MAXON_ATTRIBUTE (void, NodeCategoryExistingNodes, "net.maxon.nodecategory.existingnodes")
 
 MAXON_ATTRIBUTE (DataDictionary, PortDescriptionData, "portDescriptionData")
 
 MAXON_ATTRIBUTE (DataDictionary, PortDescriptionUi, "portDescriptionUi")
 
 MAXON_ATTRIBUTE (LazyLanguageDictionary, PortDescriptionStringLazy, "portDescriptionStringLazy")
 
 MAXON_ATTRIBUTE (DataDescriptionDefinition, NodeDescriptionData, "nodeDescriptionData")
 
 MAXON_ATTRIBUTE (DataDescriptionDefinition, NodeDescriptionUi, "nodeDescriptionUi")
 
 MAXON_ATTRIBUTE (LazyLanguageStringDataDescriptionDefinition, NodeDescriptionStringLazy, "nodeDescriptionStringLazy")
 
 MAXON_REGISTRY (PortDescriptionProvider, PortDescriptionProviders, "net.maxon.nodes.portdescriptionproviders")
 
 MAXON_DATATYPE (NodeOrTemplate, "net.maxon.node.datatype.nodeortemplate")
 
 MAXON_INTERNED_ID ("net.maxon.node.port.nodesystem", NodeSystemPort)
 
 MAXON_DECLARATION (NodeSystemClass, BaseCoreNodesNodeSystemClass, "net.maxon.corenode.basenodesystemclass")
 
 MAXON_DECLARATION (NodeSystemClass, CoreNodesNodeSystemClass, "net.maxon.corenode.nodesystemclass")
 
 MAXON_DECLARATION (Factory< DescriptionProcessor(Delegate< Result< Bool >(const NodeSystemClass &cls)> &&support)>, CoreNodesDescriptionProcessor, "net.maxon.corenode.factory.descriptionprocessor")
 
 MAXON_REGISTRY (ConstantOptimizer, ConstantOptimizers, "net.maxon.nodes.registry.constantoptimizers")
 
 MAXON_ATTRIBUTE (Bool, FunctionResult, "functionresult")
 
 MAXON_REGISTRY (ImportAdapter, ImportAdapters, "net.maxon.node.registry.importadapters")
 
class NodeTemplate MAXON_FORWARD ("maxon/nodetemplate.h")
 
 MAXON_ATTRIBUTE (void, Messages, "messages")
 
enum maxon::nodes::PORT_CONNECTION_STATE MAXON_ENUM_FLAGS (PORT_CONNECTION_STATE)
 
 MAXON_ATTRIBUTE (PORT_CONNECTION_STATE, PortConnectionState, "portconnectionstate")
 
 MAXON_DATATYPE (ComponentAccessType, "net.maxon.neutron.datatype.componentaccesstype")
 
 MAXON_REGISTRY (ComponentAccessType, InPortComponentAccessTypes, "net.maxon.node.registry.inportcomponentaccess")
 
 MAXON_REGISTRY (ComponentAccessType, OutPortComponentAccessTypes, "net.maxon.node.registry.outportcomponentaccess")
 
 MAXON_DECLARATION (Class< NodeSystemManagerRef >, NodeSystemManagerClass, "net.maxon.node.class.nodesystemmanager")
 
 MAXON_DECLARATION (Class< NodesGraphModelRef >, NodesGraphModelClass, "net.maxon.node.class.nodesgraphmodel")
 
Result< NodeToNode (const GraphNode &node)
 
Result< PortListToPortList (const GraphNode &node)
 
Result< PortToPort (const GraphNode &node)
 
Result< MutableNodeToMutableNode (const GraphNode &node)
 
Result< MutablePortListToMutablePortList (const GraphNode &node)
 
Result< MutablePortToMutablePort (const GraphNode &node)
 
 MAXON_ATTRIBUTE (OriginalGraph, OriginalGraphAttr, "net.maxon.nimbus.originalgraph")
 
class NodeSystemData MAXON_FORWARD ("maxon/nodesystem_data.h")
 
class NodeSystemClass MAXON_FORWARD ("maxon/nodesystem_class.h")
 
class NodeSystemDerivationHandler MAXON_FORWARD ("maxon/nodesystem_derivation.h")
 
enum maxon::nodes::GNODE_FLAGS UInt64 MAXON_ENUM_FLAGS (GNODE_FLAGS)
 
enum maxon::nodes::VALUEMODE Char MAXON_ENUM_LIST (VALUEMODE)
 
 MAXON_DATATYPE (MutableRoot, "net.maxon.node.datatype.mutableroot")
 
 MAXON_DECLARATION (NodeSystemClass, DefaultNodeSystemClass, "net.maxon.node.nodesystemclass")
 
 MAXON_DECLARATION (Class< NodeSystemDerivationHandler >, NodeSystemDerivationHandlerBaseClass, "net.maxon.node.class.nodesystemderivationhandlerbase")
 
template<GET_DATATYPE_POLICY POLICY>
ResultOk< const DataType & > PrivateGetDataType (TemplateArguments **, OverloadRank0)
 
 MAXON_ATTRIBUTE (Url, BASEPATH, "net.maxon.nodes.nodesystem.context.basepath")
 
 MAXON_REGISTRY (Delegate< Result< void >(const MutableRoot &)>, DescriptionFinalizers, "net.maxon.node.registry.descriptionfinalizers")
 
 MAXON_ATTRIBUTE (Bool, InheritNestedPorts, "inheritnestedports")
 
 MAXON_ATTRIBUTE (Bool, SynthesizeNestedPorts, "synthesizenestedports")
 
 MAXON_ATTRIBUTE (Bool, InheritNestedPortsSource, "inheritnestedportssource")
 
 MAXON_ATTRIBUTE (Bool, SynthesizeNestedPortsSource, "synthesizenestedportssource")
 
 MAXON_ATTRIBUTE (Bool, InheritPortSource, "inheritportsource")
 
 MAXON_ATTRIBUTE (Bool, SynthesizePortSource, "synthesizeportsource")
 
 MAXON_ATTRIBUTE (Bool, SynthesizeTypeSource, "synthesizetypesource")
 
 MAXON_ATTRIBUTE (Bool, LoopDependencySource, "loopdependencysource")
 
 MAXON_ATTRIBUTE (Bool, LoopDependencyTarget, "loopdependencytarget")
 
 MAXON_ATTRIBUTE (Bool, Dynamic, "dynamic")
 
 MAXON_ATTRIBUTE (Bool, TransientDynamic, "transientdynamic")
 
 MAXON_ATTRIBUTE (Bool, TemplateParameter, "templateparameter")
 
 MAXON_ATTRIBUTE (Bool, AllowDynamicArgument, "allowdynamicargument")
 
 MAXON_ATTRIBUTE (Bool, TypeTemplateParameter, "porttypetemplateparameter")
 
 MAXON_ATTRIBUTE (Bool, BundleTemplateParameter, "bundletemplateparameter")
 
 MAXON_ATTRIBUTE (Data, TemplateArgument, "templateargument")
 
 MAXON_ATTRIBUTE (Bool, StickyTypeTemplateParameter, "stickyporttypetemplateparameter")
 
 MAXON_ATTRIBUTE (Error, TemplateError, "templateerror")
 
 MAXON_ATTRIBUTE (Bool, ConstantParameter, "constantparameter")
 
 MAXON_ATTRIBUTE (Bool, SynthesizeDefaultValue, "synthesizevalue")
 
 MAXON_ATTRIBUTE (Bool, TappingPort, "tappingport")
 
 MAXON_ATTRIBUTE (Bool, IsGroup, "isgroup")
 
 MAXON_ATTRIBUTE (Bool, IndissolubleGroup, "indissolublegroup")
 
 MAXON_ATTRIBUTE (Bool, Permanent, "permanent")
 
 MAXON_ATTRIBUTE (Bool, HiddenFromInside, "hiddeninside")
 
 MAXON_ATTRIBUTE (Bool, HiddenFromOutside, "hiddenoutside")
 
 MAXON_ATTRIBUTE (DataType, FixedPortType, "fixedtype")
 
 MAXON_ATTRIBUTE (Bool, EnforceType, "enforcetype")
 
 MAXON_ATTRIBUTE (DataType, PortType, "type")
 
 MAXON_ATTRIBUTE (TupleDataType, FunctionParameters, "functionparams")
 
 MAXON_ATTRIBUTE (InternedId, ContextReference, "ctxref")
 
 MAXON_ATTRIBUTE (InternedId, ContextDefinition, "ctxdef")
 
 MAXON_ATTRIBUTE (Bool, ExternalContext, "externalcontext")
 
 MAXON_ATTRIBUTE (Bool, CreatedByPropagation, "net.maxon.node.createdbypropagation")
 
 MAXON_ATTRIBUTE (NodePath, PortGroup, "net.maxon.node.portgroup")
 
 MAXON_ATTRIBUTE (Id, ComponentAccessBundle, "componentaccessbundleport")
 
 MAXON_ATTRIBUTE (Bool, ComponentAccessChild, "componentaccesschild")
 
 MAXON_ATTRIBUTE (Bool, OverrideOrderIndex, "overrideorderindex")
 
 MAXON_ATTRIBUTE (Bool, ForceVariadicPortNameDerivation, "forcevariadicportnamederivation")
 
 MAXON_ATTRIBUTE (DataType, DefaultInheritedType, "net.maxon.node.defaultinheritedtype")
 
 MAXON_ATTRIBUTE (DataType, DefaultSynthesizedType, "net.maxon.node.defaultsynthesizedtype")
 
enum maxon::nodes::PORT_FLAGS MAXON_ENUM_FLAGS (PORT_FLAGS)
 
 MAXON_ATTRIBUTE (PORT_FLAGS, PortFlags, "portflags")
 
 MAXON_DATATYPE (Chain, "net.maxon.node.datatype.chain")
 
 MAXON_ATTRIBUTE (StrongCOWRef< Chain >, ChainCounterPort, "chaincounterport")
 
 MAXON_ATTRIBUTE (InternedId, GlobalContext, "globalcontext")
 
 MAXON_ATTRIBUTE (InternedId, ScenePortMode, "sceneportmode")
 
 MAXON_REGISTRY (GraphAttribute, Attributes, "net.maxon.node.registry.attributes")
 
 MAXON_ATTRIBUTE (Bool, UseAttributeResources, "useattributeresources")
 
 MAXON_ATTRIBUTE (Bool, IgnoreBase, "ignorebase")
 
 MAXON_REGISTRY (NodeSpaceRef, MaterialNodeSpaces, "net.maxon.nodes.registry.materialnodespaces")
 
 MAXON_DECLARATION (Class< NodeSpaceRef >, NodeSpaceBaseClass, "net.maxon.class.nodespace.base")
 
enum maxon::nodes::UNDO_MODE MAXON_ENUM_LIST (UNDO_MODE)
 
 MAXON_ATTRIBUTE (UNDO_MODE, UndoMode, "net.maxon.nodes.undomode")
 
 MAXON_ATTRIBUTE (Bool, NimbusUndoAttribute, "net.maxon.nodes.nimbusundoattribute")
 
 MAXON_DATATYPE (PackedMaterialParameter, "net.maxon.nodes.datatype.packedmaterialparameter")
 
 MAXON_DATATYPE (PreviewImageProviderOutputImage, "net.maxon.nodes.datatype.previewimageprovideroutputimage")
 

Variables

maxon::nodes::NodeSystemManagerInterface MAXON_ENUM_FLAGS
 
class maxon::nodes::NodesGraphHelpersInterface MAXON_ENUM_FLAGS_CLASS
 
maxon::nodes::NodeSystemInterface MAXON_ENUM_LIST
 
PortGroup_PrivateAttribute PortGroup
 

Typedef Documentation

◆ LanguageDictionary

using LanguageDictionary = DataDictionary

◆ PortDescriptionProvider

using PortDescriptionProvider = Delegate<Result<void>(DataDictionary& description, const GraphNode& port, const Id& category)>

◆ ConstantOptimizer

◆ OriginalGraph

using OriginalGraph = Tuple<nodes::NodesGraphModelRef, TimeStamp>

◆ GNodeSelector

using GNodeSelector = typename std::conditional<MUTABLE, MutableGNode, GNode>::type

The type alias GNodeSelector selects between MutableGNode (mutable case) and GNode (read-only case).

Template Parameters
MUTABLEtrue for MutableGNode, false for GNode

◆ PortListSelector

using PortListSelector = typename std::conditional<MUTABLE, MutablePortList, PortList>::type

The type alias PortListSelector selects between MutablePortList (mutable case) and PortList (read-only case).

Template Parameters
MUTABLEtrue for MutablePortList, false for PortList

◆ PortSelector

using PortSelector = typename std::conditional<MUTABLE, MutablePort, Port>::type

The type alias PortSelector selects between MutablePort (mutable case) and Port (read-only case).

Template Parameters
MUTABLEtrue for MutablePort, false for Port

◆ Connection

The type alias @CLASS contains the connected port in its first member and the Wires of the connection in its second member. So it's rather a half-connection since the starting port isn't contained. Connections are reported by PortFunctions::GetConnections.

◆ MutableConnection

The type alias @CLASS contains the connected port in its first member and the Wires of the connection in its second member. So it's rather a half-connection since the starting port isn't contained. Connections are reported by PortFunctions::GetConnections.

◆ ConnectionSelector

using ConnectionSelector = typename std::conditional<MUTABLE, MutableConnection, Connection>::type

The type alias ConnectionSelector selects between MutableConnection (mutable case) and Connection (read-only case).

Template Parameters
MUTABLEtrue for MutableConnection, false for Connection

◆ NodeSelector

using NodeSelector = typename std::conditional<MUTABLE, MutableNode, Node>::type

The type alias NodeSelector selects between MutableNode (mutable case) and Node (read-only case).

Template Parameters
MUTABLEtrue for MutableNode, false for Node

◆ PortFunctionsSuper

using PortFunctionsSuper = typename std::conditional<BASE::HAS_ERROR, typename std::conditional<BASE::MUTABLE, MutablePortListFunctions<BASE>, PortListFunctions<BASE> >::type, PortListSelector<BASE::MUTABLE> >::type

◆ NodePathArraySet

using NodePathArraySet = ArraySet<NodePath, true, FastNodePathHash>

◆ NodePathArraySetRef

◆ SampleFloat32

Convenience definitions for the immutable preview image.

◆ SamplesFloat32

◆ SamplesFloat32Ref

◆ SamplesFloat32ConstRef

◆ PreviewImageSubscriptionResultFunc

using PreviewImageSubscriptionResultFunc = Delegate<void(PREVIEW::STAGE stage, const ImageTextureRef& image)>

This delegate defines the informer about preview image results for an observed node as visible in the node previews of the attribute manager as well as the material node editor. The preview computations are performed as asynchronous streams and dispatched to all registered PreviewImageSubscriptionResultFunc delegates. Because the call to PreviewImageSubscriptionResultFunc is blocking for preview computations it is recommended to keep its implementation light-weight and hand over heavier computations to another job.

Generally, a change in the observed node will trigger such a state transition: CALCULATING -> CALCULATING -> CALCULATING -> FINISHED | THREADCANCELLED | ERROR The amount of CALCULATING steps depends on how the executed PreviewImageProvider handles progressive results.

The provided image may be null on error, cancellation or at first calculation @stage. Is it prohibited to modify the provided image in any way. Shared ownership with other observers must be assumed.

Parameters
[in]stageThe state of the preview result.
[in]imageThe preview image result, may be null.

Enumeration Type Documentation

◆ PORT_CONNECTION_STATE

enum PORT_CONNECTION_STATE
strong

Type of the PortConnectionState attribute.

Enumerator
NONE 

No flag set.

SAME_LEVEL 

There is a normal (non-propagation) connection to a port of a node at the same level.

OUTER_LEVEL 

There is a normal (non-propagation) connection to a port of an enclosing node.

PROPAGATED 

There is a propagation connection to an enclosing node.

AUTO_PROPAGATED 

There is an auto-propagation connection to an enclosing node.

NORMAL_MASK 

Use this mask to test for SAME_LEVEL or OUTER_LEVEL.

PROPAGATED_MASK 

Use this mask to test for PROPAGATED or AUTO_PROPAGATED.

◆ GNODE_FLAGS

enum GNODE_FLAGS : UInt64
strong

This enum class contains a set of flags which can be queried for g-nodes. The flags can't be set directly, they are either set at creation of a port (see MutablePortListFunctions::AddPort) or derived automatically during node system validation.

Enumerator
NONE 

No flag set.

DIRECT_PORT 

This flag is set for a port which has been created directly by user code, as opposed to derived ports (DERIVED_PORT_INHERITED, DERIVED_PORT_SYNTHESIZED) which are created based on port bundles of connected ports.

DERIVED_PORT_INHERITED 

This flag is set for a port which has been created (or would have been created) during the derivation of inherited ports, namely when a port derives an inner port from an incoming connection from a port bundle.

See also
DIRECT_PORT
DERIVED_PORT_SYNTHESIZED
DERIVED_PORT_SYNTHESIZED 

This flag is set for a port which has been created (or would have been created) during the derivation of synthesized ports, namely when a port derives an inner port from an outgoing connection to a port bundle.

See also
DIRECT_PORT
DERIVED_PORT_INHERITED
CONTEXT_SOURCE 

This flag is set for a port which is a source port of a CONTEXT wire (or which has an enclosing port with that property).

CONTEXT_TARGET 

This flag is set for a port which is a target port of a CONTEXT wire (or which has an enclosing port with that property).

FUNCTION_INSTANTIATION 

This flag is set for a port which has the FunctionParameters attribute set (or which has an enclosing port with that property). Such a port provides a context containing the function parameters, and it instantiates its predecessor subgraph for a compilation into a function.

CONTEXT_PARAMETER_PORT 

This flag is set for the context port of a built-in NODE::CONTEXT::GET node.

TAPPING_PORT 

This flag is set for a port for which the TappingPort attribute is true (or which has an enclosing port with that property).

DERIVATION_FILTER_SOURCE 

This flag can be set for a port to enable connection filtering for derivation: A connection from a port marked in such a way to a port which has the DERIVATION_FILTER_TARGET flag set has to pass the filter function NodeSystemDerivationHandlerInterface::FilterDerivationConnection, otherwise it isn't reported by PortFunctions::GetConnections.

DERIVATION_FILTER_TARGET 

See DERIVATION_FILTER_SOURCE.

ALL_MASK 

Combination of all flags of this enum.

◆ VALUEMODE

enum VALUEMODE : Char
strong

This enum defines what kind of value a port has.

Enumerator
NONE 

The port doesn't have a value at all.

DYNAMIC 

The port's value is dynamic, so it can't be computed during validation because it depends on values not known at that time.

CONSTANT 

The port's value is a known constant, so the ConstantValue attribute yields a valid value.

◆ PORT_FLAGS

enum PORT_FLAGS
strong

Type of the PortFlags attribute.

Enumerator
NONE 

No flag set.

HIDDEN 

The port shall be hidden.

USED_FOR_TEMPLATE_ARGUMENT 

The port is used for an argument for a TemplateParameter of a node template.

USED_FOR_INPUTPORTTYPE_TEMPLATE_ARGUMENT 

The port is used for an argument for a TypeTemplateParameter of an input port of a node template.

CONSTANT 

It is required that the port has a constant value.

VARIADIC 

The port is a variadic port, possibly with a fixed count (don't confuse with a variadic port instance).

VARIADIC_TEMPLATE 

The port is a true variadic port (don't confuse with a variadic port instance). Set in addition to VARIADIC.

INHERITS_NESTED_PORTS 

The port inherits nested ports from upstream ports, see InheritNestedPorts.

SYNTHESIZES_NESTED_PORTS 

The port synthesizes nested ports from downstream ports, see SynthesizeNestedPorts.

HAS_CHILDREN 

The port has children (so it's a port bundle or a variadic port).

USED_FOR_INPUTBUNDLE_TEMPLATE_ARGUMENT 

The port is used for an argument for an BundleTemplateParameter of an input port of a node template.

CHAIN 

The port belongs to a chain.

DYNAMIC 

The port is marked with the Dynamic or TransientDynamic attribute.

◆ UNDO_MODE

enum UNDO_MODE
strong

Type of the UndoMode attribute.

Enumerator
NONE 

Don't add an undo entry.

START 

Start a new undo and create an entry.

ADD 

Add an undo entry, but don't start a new undo.

Function Documentation

◆ MAXON_ATTRIBUTE() [1/61]

maxon::nodes::MAXON_ATTRIBUTE ( void  ,
NodeCategoryExistingNodes  ,
"net.maxon.nodecategory.existingnodes"   
)

◆ MAXON_ATTRIBUTE() [2/61]

maxon::nodes::MAXON_ATTRIBUTE ( DataDictionary  ,
PortDescriptionData  ,
"portDescriptionData"   
)

Data/Ui/String description of a node port.

◆ MAXON_ATTRIBUTE() [3/61]

maxon::nodes::MAXON_ATTRIBUTE ( DataDictionary  ,
PortDescriptionUi  ,
"portDescriptionUi"   
)

◆ MAXON_ATTRIBUTE() [4/61]

maxon::nodes::MAXON_ATTRIBUTE ( LazyLanguageDictionary  ,
PortDescriptionStringLazy  ,
"portDescriptionStringLazy"   
)

◆ MAXON_ATTRIBUTE() [5/61]

maxon::nodes::MAXON_ATTRIBUTE ( DataDescriptionDefinition  ,
NodeDescriptionData  ,
"nodeDescriptionData"   
)

Data/Ui/String description of a node.

◆ MAXON_ATTRIBUTE() [6/61]

maxon::nodes::MAXON_ATTRIBUTE ( DataDescriptionDefinition  ,
NodeDescriptionUi  ,
"nodeDescriptionUi"   
)

◆ MAXON_ATTRIBUTE() [7/61]

maxon::nodes::MAXON_ATTRIBUTE ( LazyLanguageStringDataDescriptionDefinition  ,
NodeDescriptionStringLazy  ,
"nodeDescriptionStringLazy"   
)

◆ MAXON_REGISTRY() [1/8]

maxon::nodes::MAXON_REGISTRY ( PortDescriptionProvider  ,
PortDescriptionProviders  ,
"net.maxon.nodes.portdescriptionproviders"   
)

◆ MAXON_DATATYPE() [1/6]

maxon::nodes::MAXON_DATATYPE ( NodeOrTemplate  ,
"net.maxon.node.datatype.nodeortemplate"   
)

◆ MAXON_INTERNED_ID()

maxon::nodes::MAXON_INTERNED_ID ( "net.maxon.node.port.nodesystem"  ,
NodeSystemPort   
)

◆ MAXON_DECLARATION() [1/8]

maxon::nodes::MAXON_DECLARATION ( NodeSystemClass  ,
BaseCoreNodesNodeSystemClass  ,
"net.maxon.corenode.basenodesystemclass"   
)

This is the base class of node systems which are aware of core nodes. You can inherit from this class to implement your own node space which shall use core nodes to do constant evaluation during validation.

◆ MAXON_DECLARATION() [2/8]

maxon::nodes::MAXON_DECLARATION ( NodeSystemClass  ,
CoreNodesNodeSystemClass  ,
"net.maxon.corenode.nodesystemclass"   
)

This is the base class of true core-node-based node systems. While BaseCoreNodesNodeSystemClass uses core nodes only to do constant evaluation, a node system based on CoreNodesNodeSystemClass can be compiled into a core node system.

◆ MAXON_DECLARATION() [3/8]

maxon::nodes::MAXON_DECLARATION ( Factory< DescriptionProcessor(Delegate< Result< Bool >(const NodeSystemClass &cls)> &&support)>  ,
CoreNodesDescriptionProcessor  ,
"net.maxon.corenode.factory.descriptionprocessor"   
)

This factory can be used to create a DescriptionProcessor which builds core-node-based nodes from descriptions. The method NodeTemplateInterface::SupportsImpl of the built node template is implemented by the delegate passed to the factory, so you can easily set up a filter which enables the node only for a specific node system class:

MAXON_DECLARATION_REGISTER(maxon::DescriptionProcessors, "net.maxonsdk.nodespace.corenodedescriptionprocessor")
{
return maxon::nodes::CoreNodesDescriptionProcessor().Create(
[] (const maxon::nodes::NodeSystemClass& cls) -> maxon::Result<maxon::Bool>
{
return cls.GetClass() == NodeSystemClassExample::GetClass();
});
}

◆ MAXON_REGISTRY() [2/8]

maxon::nodes::MAXON_REGISTRY ( ConstantOptimizer  ,
ConstantOptimizers  ,
"net.maxon.nodes.registry.constantoptimizers"   
)

◆ MAXON_ATTRIBUTE() [8/61]

maxon::nodes::MAXON_ATTRIBUTE ( Bool  ,
FunctionResult  ,
"functionresult"   
)

◆ MAXON_REGISTRY() [3/8]

maxon::nodes::MAXON_REGISTRY ( ImportAdapter  ,
ImportAdapters  ,
"net.maxon.node.registry.importadapters"   
)

The registry of ImportAdapter objects.

◆ MAXON_FORWARD() [1/4]

class NodeTemplate MAXON_FORWARD ( "maxon/nodetemplate.h"  )

◆ MAXON_ATTRIBUTE() [9/61]

maxon::nodes::MAXON_ATTRIBUTE ( void  ,
Messages  ,
"messages"   
)

◆ MAXON_ENUM_FLAGS() [1/3]

enum maxon::nodes::PORT_CONNECTION_STATE maxon::nodes::MAXON_ENUM_FLAGS ( PORT_CONNECTION_STATE  )

◆ MAXON_ATTRIBUTE() [10/61]

maxon::nodes::MAXON_ATTRIBUTE ( PORT_CONNECTION_STATE  ,
PortConnectionState  ,
"portconnectionstate"   
)

The PortConnectionState attribute is a derived attribute which can be queried at a port to get some information about the port connection state (see also PORT_CONNECTION_STATE). For input ports the information is about incoming connections, for output ports about outgoing connections.

◆ MAXON_DATATYPE() [2/6]

maxon::nodes::MAXON_DATATYPE ( ComponentAccessType  ,
"net.maxon.neutron.datatype.componentaccesstype"   
)

◆ MAXON_REGISTRY() [4/8]

maxon::nodes::MAXON_REGISTRY ( ComponentAccessType  ,
InPortComponentAccessTypes  ,
"net.maxon.node.registry.inportcomponentaccess"   
)

◆ MAXON_REGISTRY() [5/8]

maxon::nodes::MAXON_REGISTRY ( ComponentAccessType  ,
OutPortComponentAccessTypes  ,
"net.maxon.node.registry.outportcomponentaccess"   
)

◆ MAXON_DECLARATION() [4/8]

maxon::nodes::MAXON_DECLARATION ( Class< NodeSystemManagerRef >  ,
NodeSystemManagerClass  ,
"net.maxon.node.class.nodesystemmanager"   
)

The default implementation of NodeSystemManagerInterface. This class has to be used as base class for custom implementations.

◆ MAXON_DECLARATION() [5/8]

maxon::nodes::MAXON_DECLARATION ( Class< NodesGraphModelRef >  ,
NodesGraphModelClass  ,
"net.maxon.node.class.nodesgraphmodel"   
)

The default implementation of NodesGraphModelInterface. This class has to be used as base class for custom implementations.

◆ ToNode()

Result<Node> maxon::nodes::ToNode ( const GraphNode node)

Converts a GraphNode to a Node. If node doesn't point to a valid true node, an IllegalArgumentError is returned.

Returns
The node as a Node.

◆ ToPortList()

Result<PortList> maxon::nodes::ToPortList ( const GraphNode node)

Converts a GraphNode to a PortList. If node doesn't point to a valid port list, an IllegalArgumentError is returned.

Returns
The node as a PortList.

◆ ToPort()

Result<Port> maxon::nodes::ToPort ( const GraphNode node)

Converts a GraphNode to a Port. If node doesn't point to a valid port, an IllegalArgumentError is returned.

Returns
The node as a Port.

◆ ToMutableNode()

Result<MutableNode> maxon::nodes::ToMutableNode ( const GraphNode node)

Converts a GraphNode to a MutableNode. If node doesn't point to a valid true node, an IllegalArgumentError is returned. If there is no active graph transaction, an IllegalStateError is returned.

Returns
The node as a MutableNode.

◆ ToMutablePortList()

Result<MutablePortList> maxon::nodes::ToMutablePortList ( const GraphNode node)

Converts a GraphNode to a MutablePortList. If node doesn't point to a valid port list, an IllegalArgumentError is returned. If there is no active graph transaction, an IllegalStateError is returned.

Returns
The node as a MutablePortList.

◆ ToMutablePort()

Result<MutablePort> maxon::nodes::ToMutablePort ( const GraphNode node)

Converts a GraphNode to a MutablePort. If node doesn't point to a valid port, an IllegalArgumentError is returned. If there is no active graph transaction, an IllegalStateError is returned.

Returns
The node as a MutablePort.

◆ MAXON_ATTRIBUTE() [11/61]

maxon::nodes::MAXON_ATTRIBUTE ( OriginalGraph  ,
OriginalGraphAttr  ,
"net.maxon.nimbus.originalgraph"   
)

◆ MAXON_FORWARD() [2/4]

class NodeSystemData maxon::nodes::MAXON_FORWARD ( "maxon/nodesystem_data.h"  )

◆ MAXON_FORWARD() [3/4]

class NodeSystemClass MAXON_FORWARD ( "maxon/nodesystem_class.h"  )

◆ MAXON_FORWARD() [4/4]

class NodeSystemDerivationHandler maxon::nodes::MAXON_FORWARD ( "maxon/nodesystem_derivation.h"  )

◆ MAXON_ENUM_FLAGS() [2/3]

enum maxon::nodes::GNODE_FLAGS UInt64 maxon::nodes::MAXON_ENUM_FLAGS ( GNODE_FLAGS  )

◆ MAXON_ENUM_LIST() [1/2]

enum maxon::nodes::VALUEMODE Char maxon::nodes::MAXON_ENUM_LIST ( VALUEMODE  )

◆ MAXON_DATATYPE() [3/6]

maxon::nodes::MAXON_DATATYPE ( MutableRoot  ,
"net.maxon.node.datatype.mutableroot"   
)

◆ MAXON_DECLARATION() [6/8]

maxon::nodes::MAXON_DECLARATION ( NodeSystemClass  ,
DefaultNodeSystemClass  ,
"net.maxon.node.nodesystemclass"   
)

The base implementation class of NodeSystemClass. You have to use this class as base class whenever you implement NodeSystemClassInterface. It implements all methods.

◆ MAXON_DECLARATION() [7/8]

maxon::nodes::MAXON_DECLARATION ( Class< NodeSystemDerivationHandler >  ,
NodeSystemDerivationHandlerBaseClass  ,
"net.maxon.node.class.nodesystemderivationhandlerbase"   
)

The base implementation class of NodeSystemDerivationHandler. You can use this class as base class whenever you implement a derivation handler.

◆ PrivateGetDataType()

ResultOk<const DataType&> maxon::nodes::PrivateGetDataType ( TemplateArguments **  ,
OverloadRank0   
)

◆ MAXON_ATTRIBUTE() [12/61]

maxon::nodes::MAXON_ATTRIBUTE ( Url  ,
BASEPATH  ,
"net.maxon.nodes.nodesystem.context.basepath"   
)

PRIVATE.

◆ MAXON_REGISTRY() [6/8]

maxon::nodes::MAXON_REGISTRY ( Delegate< Result< void >(const MutableRoot &)>  ,
DescriptionFinalizers  ,
"net.maxon.node.registry.descriptionfinalizers"   
)

An InstantiationTrace is used as argument for NodeTemplate::Instantiate to track the nesting of calls to that method and prevent infinite recursions. Whenever an implementation of NodeTemplateInterface::InstantiateImpl calls that method itself, it has to check before that the current instantiation hasn't already been made in an enclosing call (because then we'd run into an infinite recursion), and it has to add the current instantiation to the trace:

MAXON_METHOD Result<NodeSystem> InstantiateImpl(const InstantiationTrace& parent, const TemplateArguments& args) const
{
if (parent.Contains(self, args, nullptr))
{
// This would lead to infinite recursion, handle error case.
...
}
else
{
// The current instantiation isn't part of the parent trace, we can instantiate another template.
// We have to add the current instantiation to the trace when calling Instantiate.
NodeSystem other = someTemplate.Instantiate(InstantiationTrace(parent, self, args, nullptr), someArguments) iferr_return;
...
}
...
}
//----------------------------------------------------------------------------------------
class InstantiationTrace
{
public:
//----------------------------------------------------------------------------------------
Extends an instantiation trace by a further element. This can be used within
NodeTemplateInterface::InstantiateImpl when another instantiation is made, see InstantiationTrace.
@param[in] parent The parent InstantiationTrace.
@param[in] nt The current NodeTemplate (which wants to make an instantiation itself).
@param[in] args The arguments for the current NodeTemplate nt.
@param[in] extra Some extra value to mark this element of the trace, will be used for Contains.
//----------------------------------------------------------------------------------------
InstantiationTrace(const InstantiationTrace& parent, const NodeTemplate& nt, const TemplateArguments& args, const void* extra) : _class(parent._class), _repository(parent._repository), _context(parent._context), _parent(&parent), _template(nt), _arguments(args), _extra(extra)
{
}
//----------------------------------------------------------------------------------------
Checks if the instantiation (t, args, extra) is already contained in this instantiation trace.
This is to prevent infinite recursions when a NodeTemplate instantiates another NodeTemplate, see InstantiationTrace.
@param[in] t A node template.
@param[in] args Template arguments for t.
@param[in] extra This pointer has to match the extra value given for the InstantiationTrace constructor.
@return true if (t, args, extra) is already contained in this trace, false otherwise.
//----------------------------------------------------------------------------------------
Bool Contains(const NodeTemplate& t, const TemplateArguments& args, const void* extra) const
{
return ContainsImpl(t, &args, extra);
}
//----------------------------------------------------------------------------------------
Checks if the instantiation (t, extra) is already contained in this instantiation trace (template arguments are ignored for the comparison).
This is to prevent infinite recursions when a NodeTemplate instantiates another NodeTemplate, see InstantiationTrace.
@param[in] t A node template.
@param[in] extra This pointer has to match the extra value given for the InstantiationTrace constructor.
@return true if (t, extra) is already contained in this trace (ignoring template arguments), false otherwise.
//----------------------------------------------------------------------------------------
Bool Contains(const NodeTemplate& t, const void* extra) const
{
return ContainsImpl(t, nullptr, extra);
}
//----------------------------------------------------------------------------------------
Checks if the instantiation (t, args, extra) is already contained in this instantiation trace.
This is to prevent infinite recursions when a NodeTemplate instantiates another NodeTemplate, see InstantiationTrace.
@param[in] t The identifier of a node template.
@param[in] args Template arguments for t.
@param[in] extra This pointer has to match the extra value given for the InstantiationTrace constructor.
@return true if (t, args, extra) is already contained in this trace, false otherwise.
//----------------------------------------------------------------------------------------
Bool Contains(const Id& t, const TemplateArguments& args, const void* extra) const
{
return ContainsImpl(t, &args, extra);
}
//----------------------------------------------------------------------------------------
Returns the node system class to use for instantiations. This has been set by the constructor
of the outmost trace element.
@return The node system class to use.
//----------------------------------------------------------------------------------------
const NodeSystemClass& GetNodeSystemClass() const
{
return _class.Get();
}
//----------------------------------------------------------------------------------------
Returns the asset repository to use for asset lookup. This has been set by the constructor
of the outmost trace element.
@return The asset repository to use.
//----------------------------------------------------------------------------------------
const AssetRepositoryRef& GetLookupRepository() const
{
return _repository;
}
const DataDictionary& GetAdditionalContext() const
{
return _context;
}
//----------------------------------------------------------------------------------------
Constructs the beginning of an instantiation trace.
@param[in] cls The node system class to use.
@param[in] repo The asset repository to use for lookup of assets.
//----------------------------------------------------------------------------------------
InstantiationTrace(const NodeSystemClass& cls, const AssetRepositoryRef& repo) : _class(reinterpret_cast<const ForwardRef<NodeSystemClass>&>(cls)), _repository(repo), _context()
{
}
//----------------------------------------------------------------------------------------
Constructs the beginning of an instantiation trace.
@param[in] cls The node system class to use.
@param[in] repo The asset repository to use for lookup of assets.
@param[in] additionalContext Supplementary instantiation context parameters.
//----------------------------------------------------------------------------------------
InstantiationTrace(const NodeSystemClass& cls, const AssetRepositoryRef& repo, const DataDictionary& additionalContext) : _class(reinterpret_cast<const ForwardRef<NodeSystemClass>&>(cls)), _repository(repo), _context(additionalContext)
{
}
private:
Bool ContainsImpl(const NodeTemplate& t, const TemplateArguments* args, const void* extra) const;
Bool ContainsImpl(const Id& t, const TemplateArguments* args, const void* extra) const;
ForwardRef<NodeSystemClass> _class;
AssetRepositoryRef _repository;
DataDictionary _context;
const InstantiationTrace* const _parent = nullptr;
const NodeTemplate _template = {};
const TemplateArguments _arguments = {};
const void* const _extra = nullptr;
friend class NodeTemplateInterface;
friend class NodeSystemImpl;
};
//----------------------------------------------------------------------------------------
A base implementation class of NodeTemplate. You can use this class as
base class whenever you implement NodeTemplateInterface. It provides default
implementations for all methods except NodeTemplateInterface::Instantiate.
//----------------------------------------------------------------------------------------
MAXON_DECLARATION(Class<NodeTemplate>, NodeTemplateBaseClass, "net.maxon.node.class.nodetemplatebase");
//----------------------------------------------------------------------------------------
A base implementation class for a decorator of NodeTemplate. You can use this class as
base class whenever you implement such a decorator. The class forwards calls
of all methods of NodeTemplateInterface to the decorated object.
//----------------------------------------------------------------------------------------
MAXON_DECLARATION(Class<NodeTemplate>, NodeTemplateDecoratorBaseClass, "net.maxon.node.class.nodetemplatedecoratorbase");
//----------------------------------------------------------------------------------------
This registry contains all built-in nodes (those are defined by code or by resource descriptions).
They are also accessible via the built-in asset repository, however the built-in
repository returns a decorated version which has resource descriptions and meta data
from BuiltinNodesMetaData applied on top.
The macro MAXON_DECLARATION_REGISTER_BUILTINNODE helps to register a built-in node.
//----------------------------------------------------------------------------------------
MAXON_REGISTRY(NodeTemplate, BuiltinNodes, "net.maxon.node.registry.builtinnodes");
//----------------------------------------------------------------------------------------
This registry contains meta data for built-in nodes when they are accessed via the
built-in asset repository.
//----------------------------------------------------------------------------------------
MAXON_REGISTRY(DataDictionary, BuiltinNodesMetaData, "net.maxon.node.registry.builtinnodesmetadata");
//----------------------------------------------------------------------------------------
This registry collects delegates which are called after descriptions have been applied
on top of nodes registered at BuiltinNodes. You have to register a delegate using
the exact id of the node whose description shall be finalized. For example to override
values of the first color of the checkerboard node (so that it differs from the second
which can't be defined in the resource description at the moment) the following code is used:
@code{nodes_descriptionfinalizer}
MAXON_DECLARATION_REGISTER(nodes::DescriptionFinalizers, PATTERN::NODE::GENERATOR::GRADIENT::GetId())
{
return nodes::DescriptionFinalizers::EntryType([] (const nodes::MutableRoot& root)-> Result<void>
{
iferr_scope;
nodes::MutablePort knot0 = root.GetInputs().FindPort(PATTERN::NODE::GENERATOR::GRADIENT::GRADIENT).FindPort(Id("_0")) iferr_return;
if (knot0)
{
knot0.FindPort(RENDER::PORTBUNDLE::GRADIENT::COLOR).SetDefaultValue(ColorA()) iferr_return;
knot0.FindPort(RENDER::PORTBUNDLE::GRADIENT::POSITION).SetDefaultValue(Float(0.0)) iferr_return;
}
return OK;
});
}

◆ MAXON_ATTRIBUTE() [13/61]

maxon::nodes::MAXON_ATTRIBUTE ( Bool  ,
InheritNestedPorts  ,
"inheritnestedports"   
)

This attribute controls whether nested ports shall be derived for a port or not. The derivation is based on the nested ports of connected source ports, i.e., it goes from left to right. By default the value of this attribute is true.

See also
SynthesizeNestedPorts

◆ MAXON_ATTRIBUTE() [14/61]

maxon::nodes::MAXON_ATTRIBUTE ( Bool  ,
SynthesizeNestedPorts  ,
"synthesizenestedports"   
)

This attribute controls whether nested ports shall be derived for a port or not. The derivation is based on the nested ports of connected target ports, i.e., it goes from right to left. By default the value of this attribute is true.

See also
InheritNestedPorts

◆ MAXON_ATTRIBUTE() [15/61]

maxon::nodes::MAXON_ATTRIBUTE ( Bool  ,
InheritNestedPortsSource  ,
"inheritnestedportssource"   
)

This attribute controls whether the port is used as source for the derivation of nested ports. Only if the value is true connected downstream ports will inherit nested ports of this port. By default the value of this attribute is true.

See also
InheritPortSource
InheritNestedPorts

◆ MAXON_ATTRIBUTE() [16/61]

maxon::nodes::MAXON_ATTRIBUTE ( Bool  ,
SynthesizeNestedPortsSource  ,
"synthesizenestedportssource"   
)

This attribute controls whether the port is used as source for the derivation of nested ports. Only if the value is true connected upstream ports will inherit nested ports of this port. By default the value of this attribute is true.

See also
SynthesizeNestedPorts
SynthesizePortSource

◆ MAXON_ATTRIBUTE() [17/61]

maxon::nodes::MAXON_ATTRIBUTE ( Bool  ,
InheritPortSource  ,
"inheritportsource"   
)

This attribute controls whether the port is used as source for the derivation of nested ports. Only if the value is true this port will be inherited to a connected downstream port of its parent port. By default the value of this attribute is true.

See also
InheritNestedPortsSource

◆ MAXON_ATTRIBUTE() [18/61]

maxon::nodes::MAXON_ATTRIBUTE ( Bool  ,
SynthesizePortSource  ,
"synthesizeportsource"   
)

This attribute controls whether the port is used as source for the derivation of nested ports. Only if the value is true this port will be inherited to a connected upstream port of its parent port. By default the value of this attribute is true.

See also
SynthesizeNestedPortsSource

◆ MAXON_ATTRIBUTE() [19/61]

maxon::nodes::MAXON_ATTRIBUTE ( Bool  ,
SynthesizeTypeSource  ,
"synthesizetypesource"   
)

This attribute controls whether the port is used as source for the derivation of the data type. Only if the value is true connected upstream ports will use the data type in the derivation. By default the value of this attribute is true.

◆ MAXON_ATTRIBUTE() [20/61]

maxon::nodes::MAXON_ATTRIBUTE ( Bool  ,
LoopDependencySource  ,
"loopdependencysource"   
)

This attribute has to be set to true for a port which is the source of a loop-carried dependency. Corresponding targets have to be marked with LoopDependencyTarget and reachable through dependency wires, where the first wire (starting at the source) needs to have a parallel slink wire and the last wire (reaching the target) needs to have a parallel tlink wire.

◆ MAXON_ATTRIBUTE() [21/61]

maxon::nodes::MAXON_ATTRIBUTE ( Bool  ,
LoopDependencyTarget  ,
"loopdependencytarget"   
)

This attribute has to be set to true for a port which is the target of a loop-carried dependency, see LoopDependencySource.

◆ MAXON_ATTRIBUTE() [22/61]

maxon::nodes::MAXON_ATTRIBUTE ( Bool  ,
Dynamic  ,
"dynamic"   
)

This attribute tells whether the port's value is usually set or computed at run-time of the compiled node system. You have to mark all run-time inputs of a node system with this flag, also a node with an underlying computation method for the values of its output ports (for example, a core node wrapper) has to set this value for all of its outputs. Note that the value of the port may still be computed at compile-time as a constant value during validation if all required inputs have constant values.

The value of this attribute must not be modified after first validation.

◆ MAXON_ATTRIBUTE() [23/61]

maxon::nodes::MAXON_ATTRIBUTE ( Bool  ,
TransientDynamic  ,
"transientdynamic"   
)

This attribute is similar to Dynamic, but it may be modified after first validation and won't be serialized. It's used for ports which are dynamic due to node-system-external circumstances, for example when a port's value is animated from the outside.

◆ MAXON_ATTRIBUTE() [24/61]

maxon::nodes::MAXON_ATTRIBUTE ( Bool  ,
TemplateParameter  ,
"templateparameter"   
)

This attribute has to be set for input ports which define a template parameter of a NodeTemplate. It enables a special handling of those ports during validation: Whenever the constant value of such a port doesn't match the value used for the template instantiation the template is re-instantiated with the derived constant value as argument for the template parameter, and the new instantiation replaces the previous one in the node system.

It is an error if no constant value can be derived for such a port unless the AllowDynamicArgument flag is set.

A variadic port which is a template parameter of a NodeTemplate has to be marked with DESCRIPTION::DATA::BASE::ISVARIADIC instead, this also activates the special handling.

See also
AllowDynamicArgument
TypeTemplateParameter
BundleTemplateParameter

◆ MAXON_ATTRIBUTE() [25/61]

maxon::nodes::MAXON_ATTRIBUTE ( Bool  ,
AllowDynamicArgument  ,
"allowdynamicargument"   
)

This attribute can be set in addition to TemplateParameter to allow dynamic values as arguments for the template parameter. Usually a dynamic (non-constant) value is an error, but when this flag is enabled an empty Data is used as template argument instead. This can be used by templates which allow for optimized instantiations for certain constant values (such as 0 or 1) and otherwise use a generic instantiation.

See also
TemplateParameter

◆ MAXON_ATTRIBUTE() [26/61]

maxon::nodes::MAXON_ATTRIBUTE ( Bool  ,
TypeTemplateParameter  ,
"porttypetemplateparameter"   
)

This attribute has to be set for input ports whose PortType defines a template parameter of a NodeTemplate. Similar to TemplateParameter it enables a special handling of those ports during validation: Whenever the port type of such a port doesn't match the value used for the template instantiation (which can be found in the TemplateArgument attribute of the port) the template is re-instantiated with the port type as argument for the template parameter, and the new instantiation replaces the previous one in the node system.

◆ MAXON_ATTRIBUTE() [27/61]

maxon::nodes::MAXON_ATTRIBUTE ( Bool  ,
BundleTemplateParameter  ,
"bundletemplateparameter"   
)

This attribute has to be set for ports whose set of nested ports defines a template parameter of a NodeTemplate. Similar to TemplateParameter it enables a special handling of those ports during validation: Whenever the set of nested ports of such a port doesn't match the value used for the template instantiation the template is re-instantiated with the set as argument for the template parameter, and the new instantiation replaces the previous one in the node system.

◆ MAXON_ATTRIBUTE() [28/61]

maxon::nodes::MAXON_ATTRIBUTE ( Data  ,
TemplateArgument  ,
"templateargument"   
)

This attribute is a computed attribute which can be queried for template parameter ports and returns the actually used template argument for that parameter. Usually this is the same as the ConstantValue, but there are cases where both differ, for example if ConstantValue has an illegal template argument which the node template substitutes by a legal one.

◆ MAXON_ATTRIBUTE() [29/61]

maxon::nodes::MAXON_ATTRIBUTE ( Bool  ,
StickyTypeTemplateParameter  ,
"stickyporttypetemplateparameter"   
)

This attribute is useful only when combined with TypeTemplateParameter attribute (true). Otherwise, the attribute just has no effect. It allows the template argument to stick to the port even if the type template source port is disconnect. In other words, the port will remember the the last data type that was connected to it even if disconnected. Usually, this allows to have templated node maintain their outputs after a templated input is disconnected, otherwise outgoing connections could be lost. By default the value of this attribute is true. There are cases, namely when TypeTemplateParameter value can change dynamically depending current connections, where we don't want the type to be sticky.

◆ MAXON_ATTRIBUTE() [30/61]

maxon::nodes::MAXON_ATTRIBUTE ( Error  ,
TemplateError  ,
"templateerror"   
)

Set a detailed node template error in this attribute to indicate graph validation failure using a red colored node or group. The message will be visible to users, so it shall be readable. This error is quite useful to avoid cases of incompatible scenes after type changes or type removal.

◆ MAXON_ATTRIBUTE() [31/61]

maxon::nodes::MAXON_ATTRIBUTE ( Bool  ,
ConstantParameter  ,
"constantparameter"   
)

This attribute has to be set for input ports which require a constant value. Whenever the user connects the port in a way such that a constant value for the port can't be computed, this is an error in the node setup.

◆ MAXON_ATTRIBUTE() [32/61]

maxon::nodes::MAXON_ATTRIBUTE ( Bool  ,
SynthesizeDefaultValue  ,
"synthesizevalue"   
)

This attribute can be set by a NodeTemplate at a port to prevent the derivation of a DefaultValue for that port. By default the value of this attribute is true.

◆ MAXON_ATTRIBUTE() [33/61]

maxon::nodes::MAXON_ATTRIBUTE ( Bool  ,
TappingPort  ,
"tappingport"   
)

This attribute has to be set for ports whose values shall be accessible at evaluation time.

◆ MAXON_ATTRIBUTE() [34/61]

maxon::nodes::MAXON_ATTRIBUTE ( Bool  ,
IsGroup  ,
"isgroup"   
)

When this attribute is true for a root node of a node system then that node system can be converted to a user-editable group.

◆ MAXON_ATTRIBUTE() [35/61]

maxon::nodes::MAXON_ATTRIBUTE ( Bool  ,
IndissolubleGroup  ,
"indissolublegroup"   
)

When this attribute is true for a group node this means that the group can't be dissolved into its components (e.g. because it has some extra semantics like ports which receive context or hidden nodes inherited from a base).

◆ MAXON_ATTRIBUTE() [36/61]

maxon::nodes::MAXON_ATTRIBUTE ( Bool  ,
Permanent  ,
"permanent"   
)

This attribute has to be set to true for ports which mustn't be deleted.

◆ MAXON_ATTRIBUTE() [37/61]

maxon::nodes::MAXON_ATTRIBUTE ( Bool  ,
HiddenFromInside  ,
"hiddeninside"   
)

This attribute can be set to true for ports which shall be hidden when seen from the inside (so when they belong to the group which is currently shown in the node editor).

◆ MAXON_ATTRIBUTE() [38/61]

maxon::nodes::MAXON_ATTRIBUTE ( Bool  ,
HiddenFromOutside  ,
"hiddenoutside"   
)

This attribute can be set to true for ports which shall be hidden when seen from the outside (so when they belong to a child node of the group which is currently shown in the node editor).

◆ MAXON_ATTRIBUTE() [39/61]

maxon::nodes::MAXON_ATTRIBUTE ( DataType  ,
FixedPortType  ,
"fixedtype"   
)

This attribute has to be set for input or output ports which have a known fixed type (as opposed to a port with a dynamic type which is derived from e.g. its connections).

◆ MAXON_ATTRIBUTE() [40/61]

maxon::nodes::MAXON_ATTRIBUTE ( Bool  ,
EnforceType  ,
"enforcetype"   
)

This attribute can be set to true for a port which has a valid FixedPortType to enforce that values flowing through that port are converted to the port type. It is only needed for ports which just forward the value. For example the ports of a wrapped core node dont't have to set this attribute because value forwarding ends at those ports anyway, but the value node needs to set it because it just forwards values from its input port to its output port. Without this attribute the port types of intermediate ports are ignored.

◆ MAXON_ATTRIBUTE() [41/61]

maxon::nodes::MAXON_ATTRIBUTE ( DataType  ,
PortType  ,
"type"   
)

This derived attribute tells about the effective type of an input or output port. It is set automatically during validation depending on the port and its connections.

◆ MAXON_ATTRIBUTE() [42/61]

maxon::nodes::MAXON_ATTRIBUTE ( TupleDataType  ,
FunctionParameters  ,
"functionparams"   
)

You have to set this attribute at the final port of a subgraph which shall be compiled into a function. The members of the given TupleDataType are the function parameters, and the port (and its nested ports) define the function results. The function parameters become context members of the subgraph, so they can be queried anywhere in that subgraph by using ports with a matching ContextReference attribute.

◆ MAXON_ATTRIBUTE() [43/61]

maxon::nodes::MAXON_ATTRIBUTE ( InternedId  ,
ContextReference  ,
"ctxref"   
)

You have to set this attribute at a port which, when it doesn't receive a value through a connection or a default value, shall receive the value from the context member identified by the given InternedId.

◆ MAXON_ATTRIBUTE() [44/61]

maxon::nodes::MAXON_ATTRIBUTE ( InternedId  ,
ContextDefinition  ,
"ctxdef"   
)

You have to set this attribute at a port which is used to provide values for context members if the port's name doesn't match the desired name of the context members.

◆ MAXON_ATTRIBUTE() [45/61]

maxon::nodes::MAXON_ATTRIBUTE ( Bool  ,
ExternalContext  ,
"externalcontext"   
)

You have to set this attribute if a port shall define context members for its immediately enclosing port.

◆ MAXON_ATTRIBUTE() [46/61]

maxon::nodes::MAXON_ATTRIBUTE ( Bool  ,
CreatedByPropagation  ,
"net.maxon.node.createdbypropagation"   
)

A port can be marked with this flag if it has been created by propagation of a port of an inner node to its enclosing node. Then it will automatically be removed by NodeSystemClassInterface::FinalizeModification when the inner propagation connection is removed.

◆ MAXON_ATTRIBUTE() [47/61]

maxon::nodes::MAXON_ATTRIBUTE ( NodePath  ,
PortGroup  ,
"net.maxon.node.portgroup"   
)

A port can be put into a port group by this attribute. The port group is only used for visual purposes, it has no functional meaning. The NodePath is used as a group path, so if a port shall be part of a top-level group then use a NodePath of one element, for a nested group you have to use more path elements.

◆ MAXON_ATTRIBUTE() [48/61]

maxon::nodes::MAXON_ATTRIBUTE ( Id  ,
ComponentAccessBundle  ,
"componentaccessbundleport"   
)

Set this attribute on a port which shall have component access breakdown enabled. The given id should be an element of a ComponentAccessType registry. Hence the port will know which access node to use for component access.

◆ MAXON_ATTRIBUTE() [49/61]

maxon::nodes::MAXON_ATTRIBUTE ( Bool  ,
ComponentAccessChild  ,
"componentaccesschild"   
)

This attribute is set for a component access child port (child of the bundle port). ComponentAccessBundle and ComponentAccessChild can be combined for nested component breakdown.

◆ MAXON_ATTRIBUTE() [50/61]

maxon::nodes::MAXON_ATTRIBUTE ( Bool  ,
OverrideOrderIndex  ,
"overrideorderindex"   
)

This attribute can be set on ports for which a NodeTemplate wants to keep control over the ordering of some or all of it's ports. If set to true, the NODE::ATTRIBUTE::ORDERINDEX set on the port by the NodeTemplate will be kept when resources are applied on the node. By default the value of this attribute is false.

◆ MAXON_ATTRIBUTE() [51/61]

maxon::nodes::MAXON_ATTRIBUTE ( Bool  ,
ForceVariadicPortNameDerivation  ,
"forcevariadicportnamederivation"   
)

This attribute is set to enforce the name derivation mechanism for variadic ports.

◆ MAXON_ATTRIBUTE() [52/61]

maxon::nodes::MAXON_ATTRIBUTE ( DataType  ,
DefaultInheritedType  ,
"net.maxon.node.defaultinheritedtype"   
)

This attribute is set internally within groups to pass the port type of the enclosing node system to the group's input, this helps to ensure correct template instantiations within groups if the template arguments stem from an enclosing node system.

◆ MAXON_ATTRIBUTE() [53/61]

maxon::nodes::MAXON_ATTRIBUTE ( DataType  ,
DefaultSynthesizedType  ,
"net.maxon.node.defaultsynthesizedtype"   
)

This attribute is set internally within groups to pass the port type of the enclosing node system to the group's output, this helps to ensure correct template instantiations within groups if the template arguments stem from an enclosing node system.

◆ MAXON_ENUM_FLAGS() [3/3]

enum maxon::nodes::PORT_FLAGS maxon::nodes::MAXON_ENUM_FLAGS ( PORT_FLAGS  )

◆ MAXON_ATTRIBUTE() [54/61]

maxon::nodes::MAXON_ATTRIBUTE ( PORT_FLAGS  ,
PortFlags  ,
"portflags"   
)

The PortFlags attribute is a derived attribute which can be queried at a port to get some information about the port, see PORT_FLAGS.

◆ MAXON_DATATYPE() [4/6]

maxon::nodes::MAXON_DATATYPE ( Chain  ,
"net.maxon.node.datatype.chain"   
)

◆ MAXON_ATTRIBUTE() [55/61]

maxon::nodes::MAXON_ATTRIBUTE ( StrongCOWRef< Chain ,
ChainCounterPort  ,
"chaincounterport"   
)

◆ MAXON_ATTRIBUTE() [56/61]

maxon::nodes::MAXON_ATTRIBUTE ( InternedId  ,
GlobalContext  ,
"globalcontext"   
)

This attribute can be set for ports which shall receive a global context value. Such a global context value can't be overridden in the node system. The value of this attribute identifies which global context value shall be set for the port.

◆ MAXON_ATTRIBUTE() [57/61]

maxon::nodes::MAXON_ATTRIBUTE ( InternedId  ,
ScenePortMode  ,
"sceneportmode"   
)

The ScenePortMode attribute is a derived attribute which can be queried at a port to get the NODE::ATTRIBUTE::SCENEPORTMODE attribute with the exception that for a variadic port the value of ScenePortMode is always SCENEPORTMODE_ENUM_NONE. This is useful because a variadic scene port has a scene port mode, but is no scene port itself (only its instances are).

◆ MAXON_REGISTRY() [7/8]

maxon::nodes::MAXON_REGISTRY ( GraphAttribute  ,
Attributes  ,
"net.maxon.node.registry.attributes"   
)

This registry contains GraphAttributes which implement a special handling of the attribute for node systems, see NodeSystemClassInterface::GetGraphAttribute. You can use this to register your own attributes, for example to register an attribute which shall be transient (not saved during serialization):

MAXON_ATTRIBUTE(Bool, CheckUniqueNumber, "checkuniquenumber");
...
MAXON_DECLARATION_REGISTER(Attributes, )
{
objectId = CheckUniqueNumber;
return GraphLib::CreateAttribute(CheckUniqueNumber, GraphAttribute::FLAGS::DIRECT | GraphAttribute::FLAGS::TRANSIENT | GraphAttribute::FLAGS::META);
}

◆ MAXON_ATTRIBUTE() [58/61]

maxon::nodes::MAXON_ATTRIBUTE ( Bool  ,
UseAttributeResources  ,
"useattributeresources"   
)

This attribute can be set to true for port bundles if the resources of member ports shall be obtained from attribute resources.

◆ MAXON_ATTRIBUTE() [59/61]

maxon::nodes::MAXON_ATTRIBUTE ( Bool  ,
IgnoreBase  ,
"ignorebase"   
)

◆ MAXON_REGISTRY() [8/8]

maxon::nodes::MAXON_REGISTRY ( NodeSpaceRef  ,
MaterialNodeSpaces  ,
"net.maxon.nodes.registry.materialnodespaces"   
)

The registry of all material node spaces. This registry is monitored for changes by Cinema4d. Add and remove operations are picked up by GUI components, offering the user to select among the registered spaces.

◆ MAXON_DECLARATION() [8/8]

maxon::nodes::MAXON_DECLARATION ( Class< NodeSpaceRef >  ,
NodeSpaceBaseClass  ,
"net.maxon.class.nodespace.base"   
)

The base components implements the thread-safe paradigm for data change notification, including

  • GetData()
  • SetData()
  • AddDataChangedObserver() In addition, it implements a fallback initialization for incomplete data containers passed into Init():
  • maxon::nodes::NODESPACE::SPACEID is assigned to GetClass().GetId()
  • If maxon::nodes::NODESPACE::SPACENAME is missing, it's assigned with the stringified SPACEID
  • If maxon::nodes::NODESPACE::VIEWPORTMATERIALCLASS is missing, it's assigned with a constant gray dielectric viewport material.

It is encouraged to make use of the NodeSpaceBaseClass:

class MySpace : public maxon::Component<MySpace, maxon::nodes::NodeSpaceInterface>
{
MAXON_COMPONENT(NORMAL, maxon::nodes::NodeSpaceBaseClass);
public:
MAXON_METHOD maxon::Result<void> Init(maxon::DataDictionary spaceData)
{
// Initialize spaceData attributes
return super.Init(spaceData); // Make use of the fallback init.
}
};

◆ MAXON_ENUM_LIST() [2/2]

enum maxon::nodes::UNDO_MODE maxon::nodes::MAXON_ENUM_LIST ( UNDO_MODE  )

◆ MAXON_ATTRIBUTE() [60/61]

maxon::nodes::MAXON_ATTRIBUTE ( UNDO_MODE  ,
UndoMode  ,
"net.maxon.nodes.undomode"   
)

UndoMode controls the automatic creation of an undo entry in the undo buffer. Usually an entry in the undo buffer of Cinema 4D is added whenever a transaction is started for the currently edited node graph. If you set this attribute to UNDO_MODE::NONE in the dictionary which is passed to GraphModelRef::BeginTransaction no undo entry is added.

◆ MAXON_ATTRIBUTE() [61/61]

maxon::nodes::MAXON_ATTRIBUTE ( Bool  ,
NimbusUndoAttribute  ,
"net.maxon.nodes.nimbusundoattribute"   
)

◆ MAXON_DATATYPE() [5/6]

maxon::nodes::MAXON_DATATYPE ( PackedMaterialParameter  ,
"net.maxon.nodes.datatype.packedmaterialparameter"   
)

◆ MAXON_DATATYPE() [6/6]

maxon::nodes::MAXON_DATATYPE ( PreviewImageProviderOutputImage  ,
"net.maxon.nodes.datatype.previewimageprovideroutputimage"   
)

Variable Documentation

◆ MAXON_ENUM_FLAGS

struct maxon::nodes::Chain MAXON_ENUM_FLAGS

◆ MAXON_ENUM_FLAGS_CLASS

class maxon::nodes::NodesGraphHelpersInterface MAXON_ENUM_FLAGS_CLASS

◆ MAXON_ENUM_LIST

◆ PortGroup

PortGroup_PrivateAttribute PortGroup
maxon::nodes::NodeTemplateInterface::InstantiateImpl
MAXON_METHOD Result< NodeSystem > InstantiateImpl(const InstantiationTrace &parent, const TemplateArguments &args) const
maxon::ComponentWithBase
Definition: objectbase.h:2604
maxon::Contains
MAXON_ATTRIBUTE_FORCE_INLINE Bool Contains(const PREDICATE &predicate, const KEY &key)
Definition: collection.h:76
MAXON_COMPONENT
#define MAXON_COMPONENT(KIND,...)
Definition: objectbase.h:2166
iferr_return
#define iferr_return
Definition: resultbase.h:1465
MAXON_DECLARATION_REGISTER_BUILTINNODE
#define MAXON_DECLARATION_REGISTER_BUILTINNODE(id,...)
Definition: nodeslib.h:269
maxon::Result< void >
MAXON_METHOD
#define MAXON_METHOD
Definition: interfacebase.h:877
iferr_scope
#define iferr_scope
Definition: resultbase.h:1374
Bool
maxon::Bool Bool
Definition: ge_sys_math.h:55
maxon::nodes::NodeTemplateInterface::Instantiate
MAXON_METHOD Result< NodeSystem > Instantiate(const InstantiationTrace &parent, const TemplateArguments &args=GetZeroRef< TemplateArguments >()) const