Script Editor¶
The Script Editor lets you execute single or multi-line Python code and see the output.
Note
All the code written in the Script Editor is saved as separate .py
files
for each tab at the following path: $HOME/.opendcc/script_editor
Shortcuts¶
Shortcut |
Action |
---|---|
Ctrl + Enter |
Execute selected code or if nothing is selected entire tab |
Ctrl + Space |
Force autocomplete |
Ctrl + / |
Autocomment and it can also uncomment |
Ctrl + F |
Find/Replace tools |
F1 |
Execute dir(selected code) |
Autocomplete¶
The Script Editor autocompletes Python code, words, and SdfPath using the current stage. USD properties are autocompleted as well.
Pressing Ctrl+Space forces the widget to appear.
Autocomment¶
Pressing Ctrl+/ makes the Script Editor try to intelligently comment/uncomment selected code.
Toolbar¶
The Script Editor’s toolbar has Run code, Clean output, Add to shelf, and Search actions. Add to shelf allows you to add selected code to the shelf if the current shelf is custom (not built in). Search can search tabs and the output.
Tabs¶
The tabs can be renamed with a double click on a tab. A new tab can be created with the Create new tab button.
Find/Replace¶
The Find/Replace widget is shown by pressing Ctrl+F. Matching case can be toggled off and RegEx expressions are supported.
Preferences¶
Autocomplete can be toggled on/off in the preferences. All tabs are saved before execution and will be restored if the program crashes. Saving tabs before execution can be switched off.