|
|
|
SWC_elementGetGet an element SWC_elementGet is a library function which allows users to select, allocate and load an element. Input data is a context array name and element's type (optional parameter). If the procedure succeeds then the context is filled with information about the database resource file path, database's path, database ID, scene's name, scene ID, element's type, element's name and element ID. Since an element is a sub-level of a scene, the procedure first checks the context for database and scene-related attributes. If they are not there, the procedure loads an SWC window that allows the user to select the correct values for the missing information. Once this information is supplied to the context, the procedure uses it to load the database and scene. The procedure then tries to assign the optional element type command line parameter to the context's elementType attribute. Then the context is checked for element-related information, and if any is missing, opens an SWC window that allows the user to select the element type and element. When the selection is done the selected values are assigned to the context. The procedure then allocates and loads the chosen database, scene, and element. Then it returns sceneID. package require SWC SWC_elementGet context [elementType]
Return ValueIf SWC_elementGet succeeds it returns an element pointer which can be passed to any SAA function which expects an element structure. If this procedure encounters an error it raises a TCL exception. Side EffectsUpdates the SWC allocations lists. Examples
This example displays SWC windows to select, allocate and retrieve an element and corresponding database resource file, database and scene information. Call the SAA_elementDestroy function to destroy the element presenting in MyContext. See Also |
|
copyright Video-Collage Inc. |