CreateNodesFromTemplate Data Member Function

Creates one or more sets of <Node> objects from a template model file. The set of created <Node> objects includes each <Node> under the root node of the template model. Creates one or more <Node> objects of the type indicated by 'NodeType'. If one or more <Group> node objects (or derived class objects) are selected, the template file is loaded for each selected <Group> (or derived object). Otherwise the template is loaded once, and content is placed under the default parent of the model indicated by Model.

Prototype

static int32 CreateNodesFromTemplate( EditModel3D p_oModel, string p_sTemplateFileName, NodeBuffer p_oCreatedNodes, int32 p_bAddNodes )

Parameters

Parameter Type Parameter Name Documentation
<EditModel3D>p_oModelThe model to place the created <Node> objects in.
stringp_sTemplateFileNameThe file name of the template model to load, not including the ".box" extension.
<NodeBuffer>p_oCreatedNodesA <List> to place the created <Node> objects in. This parameter can be used to access the list of <Node> objects that were created and perform further processing on them. This parameter may be null, in which case the <List> of <Node> objects is not returned.
int32p_bAddNodesThis parameter determines whether or not the <Node> objects are added to the model. If not, the <Node> objects remain in a list the user can traverse and upon which the user can perform custom operations.

Examples

Copy Text To Clipboard

None published. Please look for an example in the Scenome Scripting Language code base.