In the upcoming 1.24 release Octane will analyze the script header and add the possibility to assign shortcuts to scripts. A script header is just a comment that appears on top of your script. Ideally you describe here what your script does, how to use it, the author, ... . The full header must appear in the first 50 lines of the script, we don't bother scanning the full script.
A typical header would look like this:
- Code: Select all
-- Renders a turntable animation and saves it on disk. To use it, select the desired
-- render target and then run the script.
--
-- @description Renders a turntable animation and saves it on disk.
-- @author Thomas Loockx
-- @shortcut ctrl + 3
-- @version 0.1
--
Notice there are a few words starting with an @ character. These are special keywords that Octane recognizes. The syntax is
@keyword some text that fits on a single line
. The keywords that Octane knows are:-
@description
short description of what the script does -
@author
the guy who wrote the script -
@shortcut
shortcut to run the script, in the formatmodifier + key
. Allowed modifiers are (ctrl, alt, shift) and key is a single number, character or punctuation. -
version
version number of the script
When you modify a script's header it's important to reload the scripts (menu > script > reload scripts). Octane only scans the scripts in the user directory on startup and reload.
Special care needs to be taken when assigning shortcuts. When you would map your script to a shortcut that already exists in Octane, the Octane shortcut takes precedence. When mapping 2 scripts to the same shortcut, the script that's alphabetically first will receive the shortcut. For reference, these are the existing shortcuts in Octane:
- ctrl + n : New Project
- ctrl + o : Open Project
- ctrl + s : Save Project
- ctrl + q : Quit Octane
- ctrl + x : Cut Selected Items
- ctrl + c : Copy Selected Items
- ctrl + v : Paste Items
- cmd + , : Show Preferences (Apple Only)
- delete : Delete Selected Items
- m : Toggle Material Picking
- f : Toggle Focus Picking
- t : Toggle Target Picking
- F2 : Unfold Selected Items
For users planning on distributing their own scripts for fun and profit. Try to be diligent in writing a clear script header. Later, when we make scripts available via LiveDB, we require this header from script writers. When assigning a shortcut, clearly document it. Otherwise you could be overriding shortcuts used by other scripts.
If there are any questions, please ask. If there's need for extra @keywords, we're open for suggestions.
cheers,
Thomas