Graphic contexts
- Last UpdatedApr 24, 2024
- 2 minute read
A graphic context is a concept that pertains to 3D scene visualization and includes 2D contents displayed over the scene. Every application is characterized by a 3D scene. This scene can be split into different .mwx files that represent different locations inside the scene.
The context is a logic group of one or more .mwx files. When a context is active, the content of all its MWX files is visible in the scene. However, when the context is not active, its MWX content is not visible.
Another thing that may characterize a context is the presence of 2D user interface nodes. These nodes can be shown only where their parent context is active.
The global context
A unique global context is required in a script. The context contains all the common MWX files. These always appear and do not depend on which specialized context is currently active. Additional specialized contexts are optional.
A project can have 1-n context contemporary alive, in addition to the global context, which is always alive.
Loading MWX files
All the nodes defined inside the script that are connected to 3D scene objects (mesh, animation) are always able to be referenced. This does not depend on whether the MWX containing its 3D scene related object is active or not. Therefore, you should be careful when creating cross-context references. Nodes and objects inside the global context are always active.
See MWX file example.
Persisted Resolution
Graphic Contexts can persist screen resolutions by saving them from XR Studio Graphic Context Editor. For more information, see View Options.
Persisted resolutions are used by the XR Studio Graphic Context Editor, and also by XR Viewer Portable Windows.