2
$\begingroup$

Please let me know if headers can be configured to be at the top all the time with a setting. I have setup all my editors as much as possible to do this and saved my preferences but often it comes back so I would like to know how to banish bottom headers for good.

BTW until we found out how to use screen layouts we found the bottom header defaults unusable and extremely confusing.

$\endgroup$
1
  • $\begingroup$ This is on the roadmap for 2.8. Happy days. $\endgroup$ May 25, 2018 at 12:36

5 Answers 5

5
$\begingroup$

Script using bpy.ops.screen.region_flip

The following script flips all area headers in all screens in window to top. To flip to bottom instead change if region.type == 'HEADER' and not (region.y - area.y): to if region.type == 'HEADER' and (region.y - area.y): ie remove the not.

import bpy


context = bpy.context
c = {}  # override dictionary
window = context.window
c["window"] = window
for screen in bpy.data.screens:
    #window.screen = screen
    c["screen"] = screen
    for area in screen.areas:
        c["area"] = area
        for region in area.regions:
            if region.type == 'HEADER' and  not (region.y - area.y):
                c["region"] = region
                bpy.ops.screen.region_flip(c)

EDIT: note some, and in particular 3D areas, don't flip correctly and stay on bottom, but pro-port to be on top by the "flip to bottom" tooltip in UI. (only the tooltip toggles, not the header)

$\endgroup$
1
  • $\begingroup$ Thanks I will try this. I did not think of using scripting. $\endgroup$ Dec 15, 2017 at 9:57
1
$\begingroup$

Once you have the layout the way you like it, just press File > Save Startup File > then confirm OK.

$\endgroup$
1
  • $\begingroup$ Thanks D. Yes thats what we do today as a workaround. Unfortunately we need screen layouts for everything we do and we don't dare touch the editor setting button once its all configured. $\endgroup$ Dec 17, 2017 at 11:45
1
$\begingroup$

I was recently looking for a solution here and I've found something that works for me. Each new window gets it's header position settings cloned from the window you split it from... Unfortunately the header setting is per editor type (3D view, timeline, etc), not per window. Fortunately though, the window remembers every type's header position setting.

So if I had one window where every editor type was set to header-on-top, any new window cloned from it would get all of those default settings. So here's what I did:

  1. Collapse your layout down to one single window.
  2. Starting with 3D view go through each window type, and move the header to the top.
  3. Once that's finished, you should be able to click through all of your editor types and verify that the headers are all on top.
  4. Rebuild your layout. Since you're cloning from this single master window, each new window should retain all of the type's header positions.

At this point I saved as startup file (ctrl + u).

Note that if you have previously made layouts they won't include these changes. I deleted those and rebuilt what I wanted.

It's a lot of work but I don't have to worry about my headers jumping around anymore.

Hope someone finds this useful.

$\endgroup$
0
$\begingroup$

There is unfortunately no way. The default behaviour for new created views is hard coded in the C part. So when you split a view, then the bottom header comes of course back.

The only thing that you can do is to set up your layout, then save it by saving the startup file.

$\endgroup$
4
  • $\begingroup$ Thanks. Do you know if anyone made a custom version which alters the C code. perhaps a patch is available? $\endgroup$ Dec 15, 2017 at 9:59
  • $\begingroup$ That's mission impossible. We have 18 editors available. And when you need all possible combinations then you end in thousands of different possible builds ^^ $\endgroup$
    – Tiles
    Dec 15, 2017 at 10:54
  • 1
    $\begingroup$ Hi. Thanks for the comment. I just want to set the default and I'm not after a matrix of top and bottom settings (which can be done using the saved file). Are you saying it would be 18 patches or that each editor needs to be recoded in some complex way other than changing some define from Bottom_Header to Top_Header. BatFingers answer seemed to imply some odd reporting behavior in the 3d view. Is it something to do with that? $\endgroup$ Dec 17, 2017 at 11:37
  • $\begingroup$ As told, the default behaviour is c code. You would have to change the flags in the c parts, then recompile Blender. - The mentioned behaviour sounds like a bug to me. Maybe somebody should report it ^^ $\endgroup$
    – Tiles
    Dec 17, 2017 at 11:45
0
$\begingroup$

Unfortunately, in 4.02 is this solution by @batFINGER is broken and causes this error:

File "C:\Program Files\Blender Foundation\Blender 4.0\4.0\scripts\modules\bpy\ops.py", line 106, in __call__
    C_exec, C_undo = _BPyOpsSubModOp._parse_args(args)
  File "C:\Program Files\Blender Foundation\Blender 4.0\4.0\scripts\modules\bpy\ops.py", line 60, in _parse_args
    raise ValueError("1-2 args execution context is supported")
ValueError: 1-2 args execution context is supported
$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .