SIInstantiate

Introduced

3.0

Description

Instantiates the specified Model. When you instantiate a model, you create a "Render Instance" of it. A render instance stores no geometry, unlike Clones. Render instances are light-weight references to their "Master" (the input model); only the transformations may be modified.

Scripting Syntax

    SIInstantiate( InputObjs, [NbItems], [Name] )

Parameters

Parameter | Type | Description
InputObjs | String | Objects to instantiate. Default Value: Current selection
NbItems | Long | Number of instances to create Default Value: 1
Name | String | Name to use for new instance. Default Value: ""

Return Value

Returns an XSICollection object that contains the list of instances.

Examples

VBScript Example

    '
    ' This example creates 4 render instances of the "Man" preset model
    ' and then moves them so that they are surrounding the original model.
    '
    ' Add the "Man" preset model to the scene
    set oMan = GetPresetModel( "Man", "Horatio", ActiveSceneRoot )

    ' Create 4 instantiations of the "Man" model. The command returns
    ' a collection of the new instantiations
    set oWraiths = SIInstantiate( oMan, 4 )

    ' For each member of the collection, change its position so that the
    ' original master model is flanked by the render instances
    Translate oWraiths(0), 5.0, 0.0, 5.0, siRelative, siView, siObj, siXYZ
    Translate oWraiths(1), 5.0, 0.0, -5.0, siRelative, siView, siObj, siXYZ
    Translate oWraiths(2), -5.0, 0.0, -5.0, siRelative, siView, siObj, siXYZ
    Translate oWraiths(3), -5.0, 0.0, 5.0, siRelative, siView, siObj, siXYZ

See Also

Instantiate

Autodesk Softimage v7.5