Using the Python Editor work area
The following assumes the default Python preferences settings are used.
To copy, cut, paste, undo, redo, comment, uncomment, indent or dedent:
Right-click to choose an option from the context menu.
Python Editor work area context menu displayed
When you comment a block of text, the text is commented with two leading ##.
When you uncomment a block of text, if there is at most 2 ‘#’ in the first and second column of the line, the comment is removed.
When you indent a block of text, it is indented by X spaces (where X is specified in the configuration file). The default indent is set to four.
When you dedent a block of text, it is dedented by X spaces (where X is specified in the configuration file). The default dedent is set to four.
To auto-complete an entry:
Make sure you have the appropriate class instantiated for the auto-complete to take place.
Click Ctrl + Space.
Relevant completion options become available in a window.
In the work area, only options that have been executed become available. Usually the information should be executed in the interactive console to see this in the work area.
To add a script in the work area, do either of the following:
From the Asset Browser’s Scripts directory, select a script, and drag and drop the script in the work area.
Note: The Asset Browser’s Scripts directory includes the various Python scripts included in this release.
In the Python Editor toolbar, click the Load Script button
(Ctrl+O), and in the Open Python Script dialog navigate to locate the Python script you want to open, select the script and click Open.
Note: The default location of the various Python scripts included in this release can be found in the \bin\config\Scripts directory.
The work area displays the selected script.
To simultaneously add multiple scripts in the work area, do either of the following:
From the Asset Browser’s Scripts directory, select multiple scripts, and drag and drop the scripts in the work area.
In the Python Editor toolbar, click the Load Script button
(Ctrl+O), and in the Open Python Script dialog navigate to locate the Python scripts you want to open, select the scripts and click Open.
The work area populates to include the selected scripts and shows the last script.
To add a work area, do either of the following:
- Right-click the top border of the work area and choose New.
- Activate the Python Editor interactive console and in the Python Editor toolbar, click the Create Work Area button.
To adjust the height of the work area without resizing the Python Editor window:
- Drag the bottom border of the interactive console.