Text Editor¶
Blender has a Text Editor among its editor types,
accessible via the Editor type menu, or the shortcut Shift-F11
.
Header¶
The newly opened Text editor is gray and empty, with a very simple header Fig. Text header.
- Editor type
- The standard editor selection button.
- Menus
- Editors Menus.
- Text
- Data-block menu. Once a text is selected or newly created, the header changes. Fig. Text header with a text loaded.
- Show
The following three buttons toggle display options.
Line numbers, word-wrap text, syntax highlighting
- Run Script/ Script Node Update
- Executes the text as a Python script
Alt-P
. See Script and Templates. - Register
- Todo.
- Label
- This Label shows, if the text is saved internal or external and if there are unsaved changes to an external file.
Script and Templates¶
The most notable keystroke is Alt-P
which makes the content of the buffer being parsed by the internal Python
interpreter built into Blender.
Before going on it is worth noticing that Blender comes with a fully functional Python interpreter built in,
and with a lots of Blender-specific modules,
as described in the Scripting & Extending Blender section.
The Text Editor has now also some dedicated Python scripts, which add some useful writing tools, like a class/function/variable browser, completion... You can access them through the Template menu in the header.
Main View¶
Typing on the keyboard produces text in the text buffer.
As usual, pressing, dragging and releasing LMB
selects text.
Tip
Usages for the Text editor
The Text editor is handy also when you want to share your blend-files with others.
The Text editor can be used to write in a README
text explaining the contents of your blend-file.
Be sure to keep it visible when saving!