Text Editor#
This editor can be used to write Python scripts, Open Shading Language scripts, or just plaintext notes. To open it, you can switch to the Scripting workspace or press Shift-F11 to replace the current editor.
Колонтитул#
The newly opened Text editor is empty, with a very simple header. More options become available when a text file is created or opened.
- Тип редактора
Кнопка выбора стандартного редактора.
- Меню (menus)
Меню редактора.
- Resolve Conflict
Resolves modified file conflicts when an external text file is updated from another program.
- Reload from Disk
Opens the file from drive again, overriding any local changes.
- Make Text Internal
Converts the external text data-block into an internal one.
- Игнорировать (ignore)
Hides the warning message until the external text file is modified externally again.
- Текст (text)
A data-block menu to select a text or to create a new one. After that the header will change.
- Run Script (play icon)
Executes the text as a Python script Alt-P. See Template Menu.
- Показать (show)
Toggles for line numbers, word wrapping, and syntax highlighting.
- Script Node Update (refresh icon)
When an OSL-file is opened, this updates the Shader Script node with new options and sockets from the script.
Основной вид#
Typing on the keyboard produces text in the text buffer.
As usual, pressing, dragging and releasing LMB selects text. Pressing RMB opens the context menu.
Совет
The Text editor is also handy when you want to share your blend-file with others: you can leave a note that explains how the file is structured. Be sure to keep the editor visible when saving so they’ll see it!
Использование#
Running Scripts#
The most notable keystroke is Alt-P which executes the current text as a Python script. You can access not just the standard Python modules, but also a whole bunch of Blender-specific ones; see Скриптинг и расширения Blender.