vcanim.gif (8357 bytes)SWC_sceneGet
Home ] Sales ] Products ] Services ] Support ] Downloads ]

 

 


SWC_sceneGet

Get a scene

SWC_sceneGet is a library function which allows users to select, allocate and load a scene. The input data is a context array name.

package require SWC

SWC_SceneGet  context
context
A container for Softwish objects.

Since a scene is a sub-level of a database, a database must be specified from which to select a scene. The procedure first checks the context to see if it contains a database name. If the context does not contain a database, the procedure loads a SWC window which allows the user to select a database name and other database-related attributes (as described in SWC_databaseGet).

The context is then checked for a scene name. If there is no scene name an SWC window is displayed so that the user may select one. When the selection is done the procedure allocates and loads the chosen database and scene, filling the attributes databaseID and sceneID.

If the procedure succeeds then the context is filled with information about the database resource file path, database's path, database ID, scene name and scene ID.

Scene-Specific Attributes

AttributeName Get Set Fcrvs AttributeType Description
sceneName Y Y N string Name of the scene. This is a pathless file-name.
sceneID Y Y N string This is the name of the scene structure. This name may be passed to any SAA routine which requires a scene.

Return Value

If SWC_sceneGet succeeds the return is a sceneID. If this procedure encounters an error it will return an error string message in the TK console window.

Side Effects

Updates the SWC allocations lists.

Examples

SWC_sceneGet MyContext
Scene2
SAA_sceneGetNbModels $MyContext(sceneID) nbModels
set nbModels
18

This example loads SWC windows to select a scene, and then allocates and loads the selected scene. Call SAA function to get the number of models in this scene.

See Also

SWC_elementGet
SWC_databaseGet

Behaviors Overview ] Behavior Evaluate ] Behavior Edit ] Debugger ] Console ] Find ] SAA Library ] SW library ] SWC library ] SWN library index ] SWU library ] Attributes Index ] Scripting Examples ]

copyright Video-Collage Inc.