UI Customization : Enhancing Text Editor Header
.start
You can see the modifications I made in the image below
satishgoda at gmail dot com
Recently I have been using the Text Editor in Blender quite a bit to learn about Operator writing and customizing the UI and i felt the need for some extra functionality in the Text Editor. So, today I went about solving that problem.
You can see the modifications I made in the image below
Features added:
- Fake User toggle,
- Column number display
- In case of external text files
- Ability to open the text file in external editor
- Save and then open
- Pass the line and column number as well to the external editor
- Display if the text has been modified
- Ability to copy the name of the external file (CTRL+C while the mouse is on the filename)
Custom Hotkey for text.launch_editor operator
Source Code
Modifications to the header draw method
bpy.ops.text.launch_editor Operator
For now I am looping though the lines of the text to find the line number. I am sure there is a better way to do this using the API. Will need to investigate.
Features in Blender that made the development a breeze
- I made use of the Datablocks view in the Outliner Editor
- "Live Edit" feature in the Text Editor
References
.endsatishgoda at gmail dot com
Comments
Post a Comment
Your comments are very much appreciated. Thank You.