Linking Scripts to Variants

Learn how to link scripts to variant sets in VRED.

learnMore icon For additional information on scripting, see the Working with Scripts.

Video captions: In Autodesk VRED, scripts can be linked to variant sets. Generally, Python is the programming language used in Autodesk VRED. Open the Variant Sets Editor, with the help of the Quick Access Bar and create a new variant set. In the Variant Sets, you will find the tab, Scripts, to which scripts can be loaded. Call up the Python documentation, under Help in the main menu bar. Select Index and navigate with the help of the Search function to setRenderQuality. Copy the script line and change to the Variant Sets Editor. Add the script in your Scripts tab. Copy the line, VR_QUALITY_RAYTRACING and also add it to your Scripts tab. Rename the variant set to RT for raytracing. Duplicate the variant set and once again, go back to the Python documentation. Copy VR_QUALITY_REALISTIC_HIGH and add it to your Scripts tab. Name the variant set to GL for OpenGL. In the General tab, hotkeys can be set to run the variant sets. Execute the variant sets by double-clicking after each other. As you can see, the render mode is being controlled by a script in the variant sets. You can switch between OpenGL and raytracing.