The Code Editor addon for Blender 2.81 provides us a few features that comes in handy when coding script for Blender. One of the features is that you can scrub the code by dragging the preview on the right. Another feature is that it can place tabs of scripts that are open. And to improve reading the code it can show indents and where whitespace is used. You can switch all these features on or of and there are quite some preferences.
While this addon might improve you workflow coding in Blender, there are also a bunch of other addons for the Text Editor. Below a list of the addons, or you can also visit the thread “How would you show some love for the Blender Text Editor?” where you can see a lot of gifs and videos. But in short:
Other addons for the Text Editor
- Highlight Occurrences. Enables highlighting for words matching selected text. Highlight occurences is available on Github.
- Expand to Brackets. Expands text selection at cursor to closest brackets. Expand to Brackets is available on Github.
- Text Copy 2. Convenience operators for text editor. (Cut, copy and paste whole lines where position of cursor doesn’t matter). Text Copy 2 is available on Github.
- Text Insert 2. Smart use of adding brackets. Text Insert 2 is available on Github.
- Text Move Toggle. Makes Home key toggle between line begin and first indent. Text Move Toggle Addon is available on Github.
- Toggle Comment. Add comment toggling in Text Editor on CTRL D. Toggle Comment is available on Github.
- devTools Addon. Addon by Samuel Bernou (Pullusb) that places buttons to the Text Editor toolbar. It includes some helpers like: Print debug variable, Disable all debug, Enable all debug, Expand text shortcuts, write classes tuple, Text diff external, Open folder, Open externally. It has also a few buttons to open scripts, and Inserting / printing infos about blender. And it comes with four shortcuts as well like import/classic module statement at cursor, add “print(selection)”, trigger print debug variable, and Quote selection (with automatic quote or double quote choice). The devTools addon is available on Github.
- Contents Viewer. Addon by tin2tin that List text’s classes, definitions and create snippets. It helps you to quickly find a python class, a definition or a custom comment. The Contents Viewer Addon is available on Github.
- Trim Whitespace, Change Case and Split/Join Lines. Another addon coded by tin2tin and it adds Trim Whitespace, Change Case and Split/Join Lines functions to the Text Editor.
- Python Stylechecker. (tin2tin). Runs pep8 stylechecks on current document. Mind that you need to have Pycodestyle installed. See documentation. The Python Stylecker is available on Github.
- Code Editor Addon. See first alinea of this article. And here the link: Code Editor Addon on Github.
Snippets Library addon
For technical reasons I have to start another alinea. So the list continues, and there are some addons I didn’t include yet. But here is another addon that might be interesting. That is the Snippets library addon. The Snippets library addon Allows you use and manage a library of your own code snippets. Works in combination with devTools to make your scripting life easier. The Snippets Library Addon is available on Github.
Ahw yes, also a must to have is the Search For Online Reference addon which is available on Github. It is written by tin2tin. When you start coding in Python for Blender you will learn that you spend a lot of time searching for reference. Because searching is time consuming, this addon will come in handy. Imagine that it took me 2 hours to find out how to select multiple objects in Blender with Python. And tin2tin is right; the Text Editor in Blender could use some love.
Addon Template Generator
While writing this article my jaw starts to drop because I didn’t realize there were so many addons available for Blender’s Text Editor. An Addon Template generator comes in very handy, even if you know already how to code addons for Blender. And when I take a closer look my jaw drops even more: It is not just a simple generator, but it has loads of options and comes with quite an extensive UI. Well, this encourage me to develop the wildest ideas in my own (commercial) addons for Blender! You can download the Addon Template Generator on Github.
Script Update Check for Blender 2.80
Well, just speechless here. You know that it is a hell of a job to make old addons compatible for Blender 2.8. This is because the Blender API changed quite a lot since Blender 2.8. So, this addon (by nBurn and tin2tin) comes in very handy: This script goes through an add-on files and look for lines that might have outdated 2.7x code. The Script Update Check for Blender 2.80 addon is available on Github.
Although the title of this article is the Code Editor Addon, it is also a list of many other addons for the Text Editor for Blender. You will find this useful when you dive into coding for Blender. And even when you are an experienced coder, some other addons will save you a lot of time.
More addons for the Text Editor?
Do you know more addons that I could list in this “Code Editor Addon” article? Let me know in case you found something. I will greatly improve the addon development in the Blender community