The SmartBody distribution includes an application called sbdesktop that renders an entire SmartBody scene as a transparent window on a Windows desktop. The application is a fully functional SmartBody application, and can respond to commands controlled either automatically through a script, or interactively via the ActiveMQ network.
If not given any command line parameters, the sbdesktop application will look for a file called default.py in the same directory as the executable
and run any commands found inside. The default.py that comes with the distribution contains the following commands to set the script path and then
run a setup file that creates the Utah character and positions the camera in a way appropriate for showing him on the screen:
scene.addAssetPath("script", "../../../../data/sbm-common/scripts")
scene.run("default-init-desktop.py")
The following command line options can be sent to sbdesktop:
Argument | Description |
---|---|
-scriptpath | Path containing scripts to be initially loaded |
-script | Initial script to run. If not specified, runs default.py. |
-mediapath= | Media path for the application. The media path determines the prefix by which all subsequents paths are added. For example, if the media path is: /my/application, then specifying a relative directory for some file parameter, such as 'myfiles', results in the mediapath being added to it. In other words, the final path will be: /my/application/myfiles |
-x | X location of the transparent window, defaults to 200 |
-y | Y location of the transparent window, defaults to 150 |
-w | width of the transparent window, defaults to 320 |
-h | height of the transparent window, defaults to 240 |