About
A node system class defines a set of methods to customize the behaviour of node systems and node templates. Whenever a NodeTemplate is instantiated to a NodeSystem, this process goes through a NodeSystemClass. Also only NodeSystems which use the same class can be used together.
- Note
- The instance of maxon::nodes::NodeSystemClassInterface must be registered in maxon::nodes::NodeSpaceInterface::Init(). See NodeSpaceInterface Implementation.
Methods
These methods allow to filter nodes that can be used in the node system.
static maxon::Id g_nodeSystemClassExampleID =
maxon::Id(
"net.maxonexample.class.examplenodeclass");
class ExampleNodeSystemClassImpl :
public maxon::Component<ExampleNodeSystemClassImpl, maxon::nodes::NodeSystemClassInterface>
{
public:
{
if (
id ==
maxon::Id(
"net.maxon.node.arithmetic") ||
id ==
maxon::Id(
"net.maxon.node.scale"))
{
return true;
}
return super.SupportsImpl(templ);
}
{
return *variant.
GetLast() !=
maxon::Id(
"net.maxon.parametrictype.col<4,float>");
}
{
{
return maxon::Id(
"net.maxon.parametrictype.col<3,float>");
}
return { };
}
};
T * GetLast() const
Definition: block.h:665
Definition: objectbase.h:2651
static const Class< typename INTERFACE::Hxx1::ReferenceClass > & GetClass()
Definition: objectbase.h:2733
Definition: apibaseid.h:253
Definition: resultbase.h:766
#define MAXON_COMPONENT(KIND,...)
Definition: objectbase.h:2212
#define MAXON_COMPONENT_CLASS_REGISTER(C,...)
Definition: objectbase.h:2409
#define MAXON_METHOD
Definition: interfacebase.h:1001
Further methods are:
const auto nodesGraphModelClass = maxon::nodes::NodesGraphModelClass();
maxon::nodes::NodesGraphModelRef nodesGraphModel = nodesGraphModelClass.Create()
iferr_return;
nodesGraphModel.Init(sys, repository, filter,
true)
iferr_return;
static MAXON_METHOD const AssetRepositoryRef & GetBuiltinRepository()
Definition: nodesystem.h:2282
Result< NodeSystem > EndModification(Opt< ChangeList & > list={}, NodeSystem::FINALIZE_FLAGS finalize=NodeSystem::FINALIZE_FLAGS::CLEANUP)
Definition: nodesystem.h:818
@ NONE
Don't do any finalizations at all.
@ INCLUDE_INNER
Includes inner nodes in the view.
@ INCLUDE_HIDDEN
Includes hidden nodes in the view.
static const NO_VALUE_TYPE NO_VALUE
Definition: optional.h:17
#define iferr_return
Definition: resultbase.h:1465