OgreMax Scene Exporter for 3DS Max - Running Viewer After a Scene Export

Running Viewer After a Scene Export

Scene events are shell (command-line) commands that are run before and after a scene is exported, and are accessible through the Events page of the Scene Settings dialog:

This tutorial is for illustrative purposes only. A simpler way of launching a viewer after exporting is by setting the External Viewer in the Global Settings dialog.

This tutorial will use a scene event to run the OgreMaxViewer after the scene is exported. The viewer is assumed to be located at c:\OgreMax\OgreMaxViewer.exe

### A Simple Case

Situation: The scene being exported doesn't use any textures, or all of the textures are being copied to export directory, which happens to be the same as the directory containing the scene file.

Event: c:\OgreMax\OgreMaxViewer.exe "$(ExportFilePath)"

### Textures in a Different Directory

Situation: The scene being exported uses textures that are located in a directory named 'textures', which is located next to the directory containing the scene file.

Event: c:\OgreMax\OgreMaxViewer.exe -d "$(ExportDir)..\textures" "$(ExportFilePath)"

### Textures in a Two Different Directories, Shader Programs in a Zip File

Situation: The scene being exported uses textures that are located in a directories named 'textures1' and 'textures2', which are located next to the directory containing the scene file. Also, there is a zip file named 'shaders.zip' that contains shader programs the scene materials reference.

Event: c:\OgreMax\OgreMaxViewer.exe -d "$(ExportDir)..\textures1" -d "$(ExportDir)..\textures2" -z "$(ExportDir)..\shaders.zip" "$(ExportFilePath)"