Returns the scene's root Model
("Scene_Root"). If you are using the object model to write scripts
you will often need to access the scene root. For example, to add a
3D scene object you call the X3DObject.AddGeometry method on
the scene root; to get the top Mixer
object you need to call the Model.Mixer method on the scene root,
etc.
This property is typically called from the active (or current)
scene which you can get by calling the XSIProject.ActiveScene property
on the active project, which is available by using the XSIApplication.ActiveProject2
property. However, there is a more direct way to access the scene
root directly from the XSIApplication object which is
preferable: XSIApplication.ActiveSceneRoot.
' ' This example finds all the nulls under the scene root ' NewScene , false set oRoot = ActiveProject.ActiveScene.Root oRoot.AddNull oRoot.AddNull oRoot.AddNull oRoot.AddNull oRoot.AddNull set oNullsColl = oRoot.FindChildren(,,"Nulls") for each oNull in oNullsColl LogMessage oNull.Name next ' Expected result: 'INFO : Camera_Root 'INFO : Camera_Interest 'INFO : null 'INFO : null1 'INFO : null2 'INFO : null3 'INFO : null4 |