Editor commands and shortcuts
 
 
 

Many editor commands are accessible from the toolbar; all are assigned keyboard shortcuts. There is no menu interface.

In the interactive console, you can list shortcuts by hitting F1. The shortcut mappings for the editor are in config\Python\PythonKeyboard.txt. A graphical editor for this file is provided with the script KeyboardMapper.py.

By default, the Python editor has its own shortcut files. When it has focus, it uses its own shortcut mapping. So for example hitting Ctrl+S when it has focus saves the current script file and not the current MotionBuilder scene.

You can re-open a file, but this does not update other files referencing it. To update them, call the built-in Python function reload on the current script with the keyboard shortcut Shift+F1. This is implemented in pythonidelib.py. This ensures that any other module referencing the reloaded module is updated.

Default interactive console shortcuts:

New script (in new tab)

Ctrl+t

Open / close script

Ctrl+o / Ctrl+-

Save / Save As

Ctrl+s / F2

Context help

F1

Comment / uncomment selection

Alt+c / Alt+u

Indent text block

Tab

Next / previous tab

Ctrl+. / Ctrl+,

Go to line

Ctrl+g

Find / Find next / Find and replace

Ctrl+f / F3 / Ctrl+h

Open the Python ToolManager

F10

Execute script

F5

Add script to scene

Ctrl+*

Debug current script

F7

Default work area shortcuts:

Next / previous command

Alt+n / Alt+p

F1

List shortcuts; or display in the interactive console help for selected Python object, if any.

There are 13 customizable shortcuts to call Python scripts. Generally these scripts should do processing on the current script.

To add a shortcut:

  1. Assign a shortcut to an action in the PythonKeyboard.txt file, either by editing the file in a text editor or by using the graphical interface provided by the script KeyboardMapper.py.
  2. Assign a Python action to this shortcut in the file: config\Python\pythonidelib.py. The Python function bound to the shortcut takes as input one parameter: the name of the current script.
  3. To create the bindings between the shortcut and the function, change the shortcut variable (which is a Python dictionary).