Viz Script and Notepad++

Notepad++ Plugin Icon

If you use Viz Script as much as we do you'll probably find Viz Artist's script editor less than ideal. So at Idonix we developed some basic tooling to allow us to use Notepad++ in our Viz scripting workflow.

There are a number of aspects to this tooling: around Notepad++ we have a Viz Script "user defined language file" to give syntax highlighting, and use of the SourceCookifier plugin to allow easier navigation around your files. And in the Viz world we have a script plugin that allows us to transfer our scripts backwards and forwards between the Viz scene and Notepad++, and to use the KDiff tool to compare script versions. You'll also get the added advantage of being to able to use your favourite source control system (GIT in our case) to manage your scripts.

There's nothing particularly fancy or clever involved here - but we thought it useful enough to make us think it worth offering to the wider community. Enjoy!

Installation

No fancy automated installations here I'm afraid - you'll have to follow these steps:

  1. Download our tools archive, and unpack it to a local folder
  2. Download and install Notepad++ (if you don't already have it). Please use the 32bit version - this process doesn't work with the 64bit version!
  3. Launch Notepad++, and from the Plugins menu choose "Plugin Manager... Show Plugin Manager" (if you can't see this option it probably means your running 64bit NP++ - you need the 32bit version). On the "Available" tab scroll down to "Source Cookifier" and click Install. The plugin will download and install - if you get a dialog saying "It has not been possible to validate the integrity of SourceCookifier.dll..." and again for "...ctags.exe" then it's safe to click "Yes" (but don't hold us to that ;).
  4. Restart Notepad++. From the Plugins... SourceCookifier menu choose the "Toggle SourceCookifier" option to show the SourceCookifier window. - Choose Settings (the cog button)... Language Settings. In the Language Settings dialog click the "Import Language" button and import the SourceCookifier.Languages.Basic.xml included in the VizScriptNotepadPlusPlus.zip you downloaded in step 1 (It's OK to accept the warning about overwriting the "basic" configuration)
  5. Still in Notepad++, from the Language menu choose "Define your Language". In the User Defined Language dialog click the Import button and import the NotepadPlusPlus.Languages.VizScript3.6.xml file included in the VizScriptNotepadPlusPlus.zip you downloaded in step 1.
  6. Download and install KDiff3 (if you don't already have it). You may need to download 7-Zip to unpack the archive files)
  7. ...and we're nearly there...
  8. From VizScriptNotepadPlusPlus.zip copy the IxScriptLoader.vsl file to "C:\Program Files (x86)\vizrt\Viz3\plugin", and the IxScriptLoader file (note no extension!) to "C:\Program Files (x86)\vizrt\Viz3\plugin\icon", and then restart Viz Artist.

Done!

In Use

Notepad++ Plugin IconAdd the plugin to your container (you'll find it in "Built Ins... ScriptPlugins... Container Plugins"), and it will present this GUI.

Here's what it does:

  • Folder: Where to save file (this folder must exist - the plugin will not create it for you)
  • FileName: File name - the Init button will default according to any "'exportFileName=xx" comment found within the script
  • Save To file: Saves the script to file
  • Load from file: Loads the script back into Viz and compiles it
  • Open file in N++: Shells Notepad++ with the script file
  • Compare: Indicates whether the saved file is the same as the Viz source
  • Save version: Saves to a file, but with a timestamp appended to the name (allowing you to maintain a simple version history)
  • Save version and kdiff3: Use KDiff3 to compare current source to the previously saved version
  • Maintain params on reload: Check this box to maintain GUI parameter values between re-loads
  • Print params: Print current parameter values to the console
  • Save params: Cache the current parameter values
  • Restore params: Restore parameter values from cache
  • Target script container if not this: Set the target script container (defaults to current container)

Do keep an eye on our twitter feed for updates to our Notepad++ plugin!