Open Source Platform
for interconnected virtual worlds

How to Use OGRE Script Editor

From RexWiki

Note: the script editor doesn't check the validity of the script syntax in anyway, so you are the only one responsible for it.

There are two modes in the script editor: raw editing (for both script types) and parameter editing (material scripts only). In the raw edit mode you can edit the script file itself. In the parameter editing mode a list of editable parameters is generated for easier modifying.

To access the script editor, you have to have scripts in your inventory. Example material and particle scripts can be found in "example_assets" subfolder of the realXtend viewer folder. There are also some more sophisticated material scripts in "media\materials\scripts" subfolder (file names begin with "SSDiff"). To upload a script, use the "Upload Material Script..." or "Upload Particle Script..." functionalities from the "File" menu. The scripts should appear to your inventory in corresponding folder after the upload.

Now, find the script you uploaded, right-click it and choose "Edit Raw" or "Edit Parameter" from the pop-up menu. You can also open the script editor by double-clicking the script. If you are using parameter editing, you should now see the list of editable parameters. Click the parameter which you want edit and the parameter value editing field will appear below the list. Note that changes on the parameter value field are saved automatically. Note also that when replacing texture unit names (type "tex2d"), you can change the value easily by dragging and dropping textures from your inventory to the field.

RealXtend viewer doesn't support asset replacement at the moment so you have save the modifed script as a new one. The new name must differ from the original. Pick a new name and commit it pressing ENTER. The "Save As" button should now be enabled. If you you want to discard all the changes and close the editor, just click "Cancel". The purpose of this tutorial isn't to teach you to understand OGRE script syntax so we don't go into the details of the scripts. You can find more information about OGRE scripts at the OGRE manual (http://www.ogre3d.org/docs/manual/manual_13.html#SEC22).