TemplateΒΆ
class Template
The base class for templates returned by Node:gettemplate
Members
Methods:
| insert | (
|
Insert a sub template into the given template |
| strip | (
|
Strip a template of a part of its properties |
Functions:
| registerfilter | (
|
Register a template filter for a specific class |
Documentation
Insert a sub template into the given template
This function goes in the template hierarchy and insert the subtemplate at the requested position. For instance,
template:insert (subtemplate, "after", "Stereoscopy|LASTTAB")
will insert subtemplate in the Stereoscopy group, after the last tab. Recognized tokens are '^' for the first item of a group,
'$' for the last item of a group, FIRSTTAB for the first tab of a group and LASTTAB for the last tab of a group.
Arguments:
subtemplate The subtemplate to insertwhere Either "before" or "after"find A '|' separated path inside the template
Strip a template of a part of its properties
This function removes parts of a template tree. For instance,
template:strip ("Volumetric|.*Steps")
will strip any property in the Volumetric tab that matches 'Steps'
Recognized tokens are '^' for the first item of a group,
'$' for the last item of a group, FIRSTTAB for the first tab of a group and LASTTAB for the last tab of a group. Lua patterns
are supported to match any part of a property or group name.
Arguments:
find A '|' separated path inside the template
Register a template filter for a specific class
This function lets you register a template filter for a base property template. The filter template is called when the properties
of an object are queried, so a plugin can modify the default template
Arguments:
classname The name of the class to associate a filter tofilter The function called to fill the template. The function prototype is: table function (Node, template)