System hooks
In the Scene settings dialog, you can set up system commands to run automatically at specified
times. Currently there is only one hook: after exporting to raw info.
Under the System hooks tab, set the command and working directory and check the Enabled
checkbox. To make these settings more dynamic, you can use macros which will be substituted for the appropriate
paths when executing the command:
- %{RUBEDIR} : the folder the current .rube file is saved in
- %{RUBEFILE} : the current rube file (filename only)
- %{EXPORTDIR} : the folder that was exported to
- %{EXPORTFILE} : file that was exported (filename only)
You can select these from the Macro combobox and click the Insert button to insert them into the
text edit input fields.
Hold the mouse over the text edit input fields to show their tooltip, and you will see what the
resolved command/directory will be. Keep in mind that the EXPORTDIR and EXPORTFILE macros will
depend on the exported file, so they may change in the next export.
If the current document has not been saved yet, the RUBEDIR macro will expand to the last location
any .rube file was saved to.
If the current document has not been exported yet, the EXPORTDIR macro will expand
to the last location that any document was exported to, and the EXPORTFILE macro will expand to an empty string.
Command specification
For MacOS and Linux, you can enter the command as you would run it from the terminal, with the exception that environment
variables (eg. $PATH) will not be expanded.
For Windows, depending on what you are calling you may have to execute via the 'cmd' command. For example, this
command will fail:
copy src dst
... but these will succeed:
xcopy src dst
cmd /c copy src dst
For more details on this confusing mess, see MS-DOS 5.0 Internal and External Commands (opens default browser).
Also, regarding the copy examples above, you may need to add a trailing slash when the destination is a folder to help Windows grok the fact that it is a folder. Be nice to it now.