File Browser Not Retaining Folder Order Changes #86351

Closed
opened 2021-03-07 01:02:51 +01:00 by Bradley Lourie · 10 comments

System Information
Operating system: Windows 10 (Home and Pro versions)
Graphics card: Nvidia GTX1070 and AMD RX580

Blender Version
Broken: Blender 2.92.0 - Version File: 2.92.15 - Hash: 02948a2cab - Date: 2021-02-25 - from Steam Distribution (also occurs in downloaded portables from Blender.org)
Worked: Unknown

Short description of error
When using Blender I rely on Recent Files and Favorites for opening projects or importing other data into scenes. When I change the order of the Areas - Area - Space File Browser - Folder stacks, when the File browser is closed and reopened, the File Browser does not retain the order change. Saving Preferences after a change also has no affect on the order change when the File Browser is reopened.

Exact steps for others to reproduce the error
The File Browser is a temporary screen and each time it is opened, it creates a new instance of itself called "temp" and appears to be built using default settings.
Walking through the Data API of an instance, it appears that there are no elements within the data types to permanently set the Areas - Filebrowser - Spaces parameters for the folders to retain the folder order change.

Based on the default startup or an attached .blend file (as simple as possible).

This is based on Blender Defaults, attaching a .blend file is not required.
I am not trying to access this through Python, I'm just trying to set the order of the File Spaces in a normal File Browser instance and have the Browser retain that order (even if it is only during the current session). I think the building of the "temp" File Browser Screen is a built_in function either in the main Blender.EXE or one of its .DLLs, I can not find a .PY file that builds it.

Request: The ability to change the File Browser Spaces and have Blender retain the order after closing the File Browser.

Untitled Project.gif

**System Information** Operating system: Windows 10 (Home and Pro versions) Graphics card: Nvidia GTX1070 and AMD RX580 **Blender Version** Broken: Blender 2.92.0 - Version File: 2.92.15 - Hash: 02948a2cab44 - Date: 2021-02-25 - from Steam Distribution (also occurs in downloaded portables from Blender.org) Worked: Unknown **Short description of error** When using Blender I rely on Recent Files and Favorites for opening projects or importing other data into scenes. When I change the order of the Areas - Area - Space File Browser - Folder stacks, when the File browser is closed and reopened, the File Browser does not retain the order change. Saving Preferences after a change also has no affect on the order change when the File Browser is reopened. **Exact steps for others to reproduce the error** The File Browser is a temporary screen and each time it is opened, it creates a new instance of itself called "temp" and appears to be built using default settings. Walking through the Data API of an instance, it appears that there are no elements within the data types to permanently set the Areas - Filebrowser - Spaces parameters for the folders to retain the folder order change. Based on the default startup or an attached .blend file (as simple as possible). This is based on Blender Defaults, attaching a .blend file is not required. I am not trying to access this through Python, I'm just trying to set the order of the File Spaces in a normal File Browser instance and have the Browser retain that order (even if it is only during the current session). I think the building of the "temp" File Browser Screen is a built_in function either in the main Blender.EXE or one of its .DLLs, I can not find a .PY file that builds it. Request: The ability to change the File Browser Spaces and have Blender retain the order after closing the File Browser. ![Untitled Project.gif](https://archive.blender.org/developer/F9875084/Untitled_Project.gif)
Author

Added subscriber: @BradLourie

Added subscriber: @BradLourie
Contributor

Added subscriber: @dupoxy

Added subscriber: @dupoxy
Contributor

I can reproduce this.
0001-0898.mp4
As a workaround you can use the file browser when not in a new windows.

I can reproduce this. [0001-0898.mp4](https://archive.blender.org/developer/F9876681/0001-0898.mp4) As a workaround you can use the file browser when not in a new windows.
Author

Thank you for your quick reply dupoxy, however the I don't think the workaround described is not really a viable solution (for me anyway).
It merely opens a file browser window in the current window it was called from. Yes the areas retain their new positions, but you can't do anything with the contents in the browser.
For example, when I tried the workaround as you described, I double clicked a blend file to see if it would open... nothing. I tried dragging a blend file from the browser into a viewport window... nothing.
As I have never called the File Browser this way before, I may be doing something wrong in trying to invoke the contents from it but from my experiments so far the browser opened this way is just information and not really usable.

Thank you for your quick reply dupoxy, however the I don't think the workaround described is not really a viable solution (for me anyway). It merely opens a file browser window in the current window it was called from. Yes the areas retain their new positions, but you can't do anything with the contents in the browser. For example, when I tried the workaround as you described, I double clicked a blend file to see if it would open... nothing. I tried dragging a blend file from the browser into a viewport window... nothing. As I have never called the File Browser this way before, I may be doing something wrong in trying to invoke the contents from it but from my experiments so far the browser opened this way is just information and not really usable.
Member

Added subscriber: @Harley

Added subscriber: @Harley
Member

Of course this isn't the real solution you want, but the following might be a nice workaround for you.

Open ...\scripts\startup\bl_ui\space_filebrowser.py then scroll down to the very bottom and you will see a list of "classes" that looks a bit like this:

classes = (
    ...
    FILEBROWSER_UL_dir,
    FILEBROWSER_PT_bookmarks_volumes,
    FILEBROWSER_PT_bookmarks_system,
    FILEBROWSER_MT_bookmarks_context_menu,
    FILEBROWSER_PT_bookmarks_favorites,
    FILEBROWSER_PT_bookmarks_recents,
    FILEBROWSER_PT_advanced_filter,
    ...

Just rearrange the "bookmarks" items any way you wish. For example like this:

classes = (
    ...
    FILEBROWSER_UL_dir,
    FILEBROWSER_PT_bookmarks_favorites,
    FILEBROWSER_PT_bookmarks_recents,
    FILEBROWSER_PT_bookmarks_volumes,
    FILEBROWSER_PT_bookmarks_system,
    FILEBROWSER_MT_bookmarks_context_menu,
    FILEBROWSER_PT_advanced_filter,
    ...

And then you will find that they are in the order of "Favorites", "Recent", "Volumes", "System".

If want to have any of those lists be closed by default, look for those names in the script higher up and add "bl_options = {'DEFAULT_CLOSED'}". So for example to have the Volumes list be initially closed it would look like this:

class FILEBROWSER_PT_bookmarks_volumes(Panel):
    bl_space_type = 'FILE_BROWSER'
    bl_region_type = 'TOOLS'
    bl_category = "Bookmarks"
    bl_label = "Volumes"
    bl_options = {'DEFAULT_CLOSED'}
    ...

Might get you what you want.

FBOrder.png

Of course this isn't the real solution you want, but the following might be a nice workaround for you. Open ...\scripts\startup\bl_ui\space_filebrowser.py then scroll down to the very bottom and you will see a list of "classes" that looks a bit like this: ``` classes = ( ... FILEBROWSER_UL_dir, FILEBROWSER_PT_bookmarks_volumes, FILEBROWSER_PT_bookmarks_system, FILEBROWSER_MT_bookmarks_context_menu, FILEBROWSER_PT_bookmarks_favorites, FILEBROWSER_PT_bookmarks_recents, FILEBROWSER_PT_advanced_filter, ... ``` Just rearrange the "bookmarks" items any way you wish. For example like this: ``` classes = ( ... FILEBROWSER_UL_dir, FILEBROWSER_PT_bookmarks_favorites, FILEBROWSER_PT_bookmarks_recents, FILEBROWSER_PT_bookmarks_volumes, FILEBROWSER_PT_bookmarks_system, FILEBROWSER_MT_bookmarks_context_menu, FILEBROWSER_PT_advanced_filter, ... ``` And then you will find that they are in the order of "Favorites", "Recent", "Volumes", "System". If want to have any of those lists be closed by default, look for those names in the script higher up and add "bl_options = {'DEFAULT_CLOSED'}". So for example to have the Volumes list be initially closed it would look like this: ``` class FILEBROWSER_PT_bookmarks_volumes(Panel): bl_space_type = 'FILE_BROWSER' bl_region_type = 'TOOLS' bl_category = "Bookmarks" bl_label = "Volumes" bl_options = {'DEFAULT_CLOSED'} ... ``` Might get you what you want. ![FBOrder.png](https://archive.blender.org/developer/F9877881/FBOrder.png)
Contributor

Sorry about that.The "full" workaround is:
0001-0881.mp4

  • In Edit>Preferences>Save & Load uncheck Load UI
  • For the file you want to open from the File browser click and drag from the icon
  • (In File>Defaults>Save Startup File)
Sorry about that.The "full" workaround is: [0001-0881.mp4](https://archive.blender.org/developer/F9877941/0001-0881.mp4) - In Edit>Preferences>Save & Load uncheck Load UI - For the file you want to open from the File browser click and drag from the **icon** - (In File>Defaults>Save Startup File)
Author

Thank you for the quick response and solution Harley.

We have been discussing this in the Blender Community Hub on Steam as well and have come up with a couple of solutions which also work. This method was also mentioned there.
However the best temporary solution (for now) was submitted by Dynamic Dragon a little while ago and is discussed here in Post #10.

https://steamcommunity.com/app/365670/discussions/0/3102389184724096860/

By adding the code they provided to Blender\2.92\scripts\addons_contrib, if we have to refresh local files or a new version is released, the code is not disturbed and will continue to work, I believe it will also be transferred to the new version if required and we can adjust the ORDER as required in the contributed code easily without digging into blender native py files.

Thank you for the quick response and solution Harley. We have been discussing this in the Blender Community Hub on Steam as well and have come up with a couple of solutions which also work. This method was also mentioned there. However the best temporary solution (for now) was submitted by Dynamic Dragon a little while ago and is discussed here in Post #10. https://steamcommunity.com/app/365670/discussions/0/3102389184724096860/ By adding the code they provided to Blender\2.92\scripts\addons_contrib, if we have to refresh local files or a new version is released, the code is not disturbed and will continue to work, I believe it will also be transferred to the new version if required and we can adjust the ORDER as required in the contributed code easily without digging into blender native py files.
Author

Thanks for the update dupoxy. I now understand that.

Thanks for the update dupoxy. I now understand that.

Closed as duplicate of #74611

Closed as duplicate of #74611
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#86351
No description provided.