The tool viewer.py reads one or more files and displays the scene using a simple OpenGL renderer. It creates events such as keyboard, mouse or joystick events that can be used by the components in the scene.
If the environment variable VIEWER_DEFAULT_OPTIONS exists, it is read and parsed to set the default options. After that the options in the command line are parsed.
Usage:
viewer.py [options] inputfiles
To exit the viewer press Escape or close the window. How to navigate in the scene depends on the navigation mode (see option -N).
Options:
If the argument specifies a file this file is loaded as a plugin, if it is a directory, all files in this directory are loaded. You can specify this option more than once or you can use a comma separated list of names.
You can also set files and paths via the environment variable CGKIT_PLUGIN_PATH. The files/paths have to be separated either by ‘:’ or ‘;’.
Specify which navigation mode to activate. The viewer can emulate the navigation of a few common 3D packages. Possible values are Maya (default), MAX and Softimage (case-insensitive).
In Maya mode you navigate by pressing the Alt key in combination with any of the three mouse buttons. In MAX mode you press the middle mouse button either alone or in combination with Alt or Control and Alt. In Softimage mode, only the Softimage Navigation Tool is emulated (it’s as if this tool is permanently active), i.e. you navigate by using one of the three mouse buttons.
Events:
The viewer tool generates the following user input events (see the module cgkit.events for more details about these events):
Timing:
The operations per frame are as follows (in this order):