Murl Engine Lua Addon API  Version 1.0 beta
Murl.Graph.ITemplate

The ITemplate graph node interface.

A template node stores the Resource::IGraphNode object it was created from, in order to be able to create Graph::IInstance nodes later on, which may directly source their sub-graph from the already existing graph by referencing this template. It is often cumbersome to always have to create an extra graph resource object within a package when it is desired to create multiple instances of a sub-graph. Using nodes implementing this interface, instantiation may also occur like this:

<Template id="myTemplate>
<Namespace id="{namespaceId}">
... put your nodes here ...
</Namespace>
</Template>
<Instance templateId="myTemplate" namespaceId="nmSpc1"/>
<Instance templateId="myTemplate" namespaceId="nmSpc2"/>
<Instance templateId="myTemplate" namespaceId="nmSpc3"/>


Table members

Methods


GetNodeInterface()

Get the constant Graph::INode interface. This method returns a constant pointer to the node's Graph::INode interface, to be able to query common node properties such as active state, visibility or ID.

Murl.Graph.INode GetNodeInterface()

Returns
Murl.Graph.INode The constant Graph::INode interface, or null if not available

SetResourceGraphNode(node)

Set the resource graph node from which to create template instances.

Boolean SetResourceGraphNode(Murl.Resource.IGraphNode node)

Parameters
nodeThe resource graph node.
Returns
Boolean true if successful.

GetResourceGraphNode()

Get the resource graph node from which to create template instances.

Murl.Resource.IGraphNode GetResourceGraphNode()

Returns
Murl.Resource.IGraphNode The resource graph node.

GetUserParameters()

Get the set of user-defined template parameters, if any are present.

Murl.IAttributes GetUserParameters()

Returns
Murl.IAttributes The set of parameters, or null if no user-defined parameters are present.