Maniphest T71935

Blender does not remember windows size and position
Closed, Archived

Assigned To
Julian Eisel (Severin)
Authored By
pan beep (beep)
Nov 26 2019, 4:42 PM
Tags
  • BF Blender
Subscribers
Dave (dave5544)
Julian Eisel (Severin)
Maciej Jutrzenka (Kramon)
Matt (Kickflipkid687)
pan beep (beep)
Rombout Versluijs (rombout)
stain2319 (stain2319)
Stephen Hamacek (hammers)

Description

System Information
Operating system: Windows 10
Graphics card: Nvidia GTX 970

Blender Version
Broken: version: 2.81 (sub 16), branch: master, commit date: 2019-11-20 14:27, hash: 26bd5ebd42e3, type: Release

Short description of error
Blender does not remember windows size and position of preferences window and size of file browser window. Their sizes and positions are always reset after opening.

Exact steps for others to reproduce the error
Open preferences, resize, and position it. Close preferences. Open them again. The window position and size will be reset.

Related Objects

Mentioned Here
D4339: Window manager: window size/position persistence
rB26bd5ebd42e3: Update rest of submodules to correct commit for Blender 2.81 release

Event Timeline

pan beep (beep) created this task.Nov 26 2019, 4:42 PM
Julian Eisel (Severin) lowered the priority of this task from 90 to 30.Nov 26 2019, 5:00 PM
Julian Eisel (Severin) added a subscriber: Julian Eisel (Severin).

Support for remembering Preferences size and position was never added, neither was the File Browser position. Not sure if it should be added even. The File Browser should however remember the size it was saved in, can you re-check on that?

Maciej Jutrzenka (Kramon) added a subscriber: Maciej Jutrzenka (Kramon).Nov 26 2019, 5:03 PM

it shouldn't it would cause huge problems where accidentialy you would move it out of the scope.. and usually to fix such issiue u just restart blender etc... Floating windows allways should go to defult position after restart of app

pan beep (beep) added a comment.Nov 26 2019, 5:08 PM

The File Browser remembers the size. It does not remember the position.

Regarding Preferences size and position those parameters can be remembered when saved but not when closed. Reopening the file restores the files in their last positions. Why the position and size is not saved after closing? Looks like a bug to me.

pan beep (beep) added a comment.Nov 26 2019, 5:12 PM
In T71935#818261, @Maciej Jutrzenka (Kramon) wrote:

it shouldn't it would cause huge problems where accidentialy you would move it out of the scope.. and usually to fix such issiue u just restart blender etc... Floating windows allways should go to defult position after restart of app

I don't agree. Many Adobe apps have the possibility to save window position and it never caused any issues. There is always option to restore the layout if something is messed up.

Julian Eisel (Severin) changed the task status from Unknown Status to Unknown Status.EditedNov 26 2019, 5:19 PM
Julian Eisel (Severin) claimed this task.

Storing such information would mean we'd have to ensure it works in all kinds of cases - when opened with different monitor setups, different DPIs, different OSes, etc. Versioning may also become problematic: If we change the layout of the window contents, we may have to add extra versioning code to make sure old sizes/positions are updated correctly.
And yes, storing such things may also cause some issues in practice, as @Maciej Jutrzenka (Kramon) mentioned. We don't have an option to restore the default layout yet (although I'd love to have this).
Note that I'm not totally against this - it's just that this would need quite some effort to work reliably, and we have other priorities.
Also related: D4339.

In some cases it's just better to have something simple and predictable, rather than something that tries to be smart and just causes different problems.

Either way, everything works as designed here. If you disagree about the design, that's fine but not something we can deal with on our bug tracker. We have to keep some strict policies here unfortunately.
So thanks for the report, but I don't see a bug here.

pan beep (beep) added a comment.Nov 26 2019, 5:29 PM
In T71935#818306, @Julian Eisel (Severin) wrote:

Storing such information would mean we'd have to ensure it works in all kinds of cases - when opened with different monitor setups, different DPIs, different OSes, etc. Versioning may also become problematic: If we change the layout of the window contents, we may have to add extra versioning code to make sure old sizes/positions are updated correctly.
And yes, storing such things may also cause some issues in practice, as @Maciej Jutrzenka (Kramon) mentioned. We don't have an option to restore the default layout yet (although I'd love to have this).
Note that I'm not totally against this - it's just that this would need quite some effort to work reliably, and we have other priorities.
Also related: D4339.

In some cases it's just better to have something simple and predictable, rather than something that tries to be smart and just causes different problems.

Either way, everything works as designed here. If you disagree about the design, that's fine but not something we can deal with on our bug tracker. We have to keep some strict policies here unfortunately.
So thanks for the report, but I don't see a bug here.

As I written earlier it works when the file is saved and windows are not closed. Reopening the file keeps the windows in last position and size. Why can't that be saved as defaults? Please give people a choice. Opening Preferences and resizing them every time it is opened is quite annoying.

Julian Eisel (Severin) added a comment.EditedNov 26 2019, 5:45 PM

When writing project .blend files, the Blender window-manager is written to it, and with it it's window properties. When reading the file, the window-manager does some trickery to restore things as much as possible, without glitches (e.g. closing all windows to open the new set of windows).
Now if we wanted to store data on individual temporary windows as part of the preferences (which is where you'd want to store this), we'd have to implement this quite differently, since we don't store the window-manager then, only the preferences data.

I've actually worked on a more generic approach to store UI data like this in the preferences when working on the file browser memory (which also stores display type, filters, sorting, etc), but it turned out to be quite complicated. It would definitely require some days of work. This is added to the work to make sure this works on different monitor setups, DPIs, OSes, ...

Again, it's not that I'm not totally against this, it's just nothing simple to get to work, and we have other priorities.

pan beep (beep) added a comment.Nov 26 2019, 5:51 PM

So what about a simple setting to set the preferences window a fixed size defined by a user? Why can't it be bigger? I guess no one uses 800x600 pixels display anymore.

Julian Eisel (Severin) added a comment.Nov 26 2019, 6:16 PM

The size was decided on by the UI team because it seemed best for the new layout.
It's not something we should add a setting for, we're wary of adding more settings and generally try to avoid it.

pan beep (beep) added a comment.Nov 26 2019, 7:32 PM

This script below does what I want. Maybe it will help other users too.

import bpy

# Modify scene settings
render = bpy.context.scene.render
render.resolution_x = 900
render.resolution_y = 800
render.resolution_percentage = 100
render.display_mode = "WINDOW"

# Call image editor window
bpy.ops.render.view_show("INVOKE_DEFAULT")

# Change area type
area = bpy.context.window_manager.windows[-1].screen.areas[0]
area.type = "PREFERENCES"
Stephen Hamacek (hammers) added a subscriber: Stephen Hamacek (hammers).EditedFeb 1 2020, 4:47 AM

Ive hit a situation where the save image browser defaults to the size of the rendered image render window being saved, but this is really inconvenient in the case of portrait aspect renders. Each time I need to stretch the file browser or close settings etc. to read the filenames. Perhaps that's not the best choice for sizing the browser.

Dave (dave5544) added a subscriber: Dave (dave5544).Apr 11 2020, 9:56 PM
This comment was removed by Dave (dave5544).
Matt (Kickflipkid687) added a subscriber: Matt (Kickflipkid687).Jun 28 2020, 5:26 PM

I wish there was an option as well, to let the user CHOOSE to set a size /save the position if they want in the settings... Not default, but let the user choose to do so.

I've had Apps/UIs get stuck offscreen sure.... but you can easily get it back on Windows/PC. Just hit a hotkey and move/snap it over. Not sure about Linux/Mac though.
I could try using the script posted above though. But it's very annoying that the Prefs/Addon window constantly resizes/positions every time I close it, as others said.

pan beep (beep) added a comment.Jun 28 2020, 6:10 PM

The stubbornness of developers in this matter still amazes me.

stain2319 (stain2319) added a subscriber: stain2319 (stain2319).Sep 27 2020, 4:54 AM

This drives me nuts. I use a graphics tablet. Every time I go to open a file, like an image texture or whatever, i have to put down the pen and grab the mouse because the File window opens on a different monitor. So. Annoying.

Rombout Versluijs (rombout) added a subscriber: Rombout Versluijs (rombout).EditedApr 9 2021, 8:46 PM
In T71935#818493, @pan beep (beep) wrote:

This script below does what I want. Maybe it will help other users too.

import bpy

# Modify scene settings
render = bpy.context.scene.render
render.resolution_x = 900
render.resolution_y = 800
render.resolution_percentage = 100
render.display_mode = "WINDOW"

# Call image editor window
bpy.ops.render.view_show("INVOKE_DEFAULT")

# Change area type
area = bpy.context.window_manager.windows[-1].screen.areas[0]
area.type = "PREFERENCES"

Thats quite clever. One thing i would change is store these settings before you call it. Then restore those setting after the call for preferences. Other wise you would need to adjust you render X an Y back to your working size.
I made an addon for this, perhaps a bit over the top. But i dont need to resize it all the time now. Ill send you a link.

Small preview

Rombout Versluijs (rombout) added a comment.EditedApr 10 2021, 1:14 AM

Also because i restore all values right after the window is called, none of the settings which affects the render window is touched. It could be quite annoying if you need to redo your render output dimension all the time. Also this plain script would have been added to the default in order to have it always available, but older projects would still miss it. Thats why i though a simple addon is more conevnient :)

For those interested, you can find it here. I added width and height. The panel is a different vs the normal one, we dont see the hamburger menu in the bottom left. You can still save it from the "Preferences" button you see at the bottom

PS the current version also does height, i found that could be more convenient as well.
The above video does not show that

https://github.com/schroef/Custom-Preferences-Size

pan beep (beep) added a comment.Apr 14 2021, 8:43 PM
In T71935#1144171, @Rombout Versluijs (rombout) wrote:

Also because i restore all values right after the window is called, none of the settings which affects the render window is touched. It could be quite annoying if you need to redo your render output dimension all the time. Also this plain script would have been added to the default in order to have it always available, but older projects would still miss it. Thats why i though a simple addon is more conevnient :)

For those interested, you can find it here. I added width and height. The panel is a different vs the normal one, we dont see the hamburger menu in the bottom left. You can still save it from the "Preferences" button you see at the bottom

PS the current version also does height, i found that could be more convenient as well.
The above video does not show that

https://github.com/schroef/Custom-Preferences-Size

Great! Thank you for this! I wonder why it is not in regular build?