Have Blender Keep its Active Workspace Tab in View When it Changes
As someone who currently spends more time writing text than programming, I keep many TEXT_EDITOR areas open on many Scripting workspace tabs that get auto-renamed to the name of the text file initially loaded by a setup script into the given tab.
Having those workspace tabs means that when more text files open, tabs disappear off to the right side. By the time the text files all load the context becomes the text content of the tab, hiding way off on the right at the last-loaded tab, but the tab fails to automatically stay within the viewable screen space.
Pressing Ctrl+PageDown/Ctrl+PageUp to switch workspace does likewise: the active workspace tab can disappear out of view.
If the mouse hovers on the top bar by the tabs, the mousewheel can scroll to find the active workspace tab, but were the active workspace tab kept visible this would not be needed and usability be better.
bpy.ops.workspace.append_activate(idname="Scripting", filepath="<startup.blend>")...
...bpy.data.workspaces["Scripting"].name = str(filename)...
...area.spaces.active.text = bpy.data.texts[str(filename)]
(I did not find a way to do this in bpy or bgl yet anyway.)
0 Comments