UI: Window Title With Version #111998
No reviewers
Labels
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
6 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#111998
Loading…
Reference in New Issue
No description provided.
Delete Branch "Harley/blender:WindowTitle"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Include blender version information in title (including cycle and
patch), and also indicate unsaved and dirty status better.
Initial state of unsaved and unchanged:
Unsaved and also changed
Saved file but unchanged since last save:
Saved file that needs resaving:
Recovered File:
For people who display window titles on the task bar, it's important to see the unsaved indicator even when the title is cut short due to little space remaining:
What most apps on Windows do (explorer, firefox, vscode to name a few) is swapping the order of the segments a bit, so it'd be something like this:
Similarly, when having multiple Blender executables open on different project files, it's more important to see which ones belong to which .blend file, than seeing the app name and the version number repeated for each window. VSCode for example only shows the file name in the title by default.
But not sure if such a change would be welcome, just throwing the idea out there since this PR is already changing things around a bit.
Oh that is a very interesting idea!
Your example, showing text, can't really include much. It doesn't look like it could include any portion of the name. My desire for the version number is more for this:
Removing the path is interesting. There is going to be more push to have a custom titlebar area (so we use the entire space and draw our own caption). In that case we get that extra room but we can't show the path, the just name. But then setting the OS title this way we could still see the path on the taskbar.
Nice! I think that could work better.
It'll also work well on macOS since they show both the start and end of the title, shortening the middle bits. This is how it looks at the moment:
I updated the PR and the captures in the first comment.
Only tested on macOS so far but it looks great!
Works as expected.
Just opened:
With a file open, modified, on a long-ish path.
@brecht @ideasman42
What do you guys think?
Design is fine with me.
@ -498,0 +501,4 @@
version_cycle = "";
}
const char *patch = BLENDER_VERSION_PATCH != 0 ? "." STRINGIFY(BLENDER_VERSION_CYCLE) : "";
Deduplicate this code with
blender_version_init
inblender.cc
. If the formatting needs to be different you can construct a second string in that function.UI: Window Title Changesto UI: Window Title With VersionIncluding the full path first has the down-side that people who work on network drives with long paths (students at universities for e.g.) might have not get useful titles. If the OS is usefully abbreviating the titles it's not so bad, but it wouldn't surprise me if some systems don't handle this so well, although long paths which are clipped in the middle are unlikely to clip out the filename.
Checking other applications, most use the filename only (not the full path).
If others prefer the full path first, I'm not that fussed but suspect there are reasons this is not such a common convention.
@ -496,2 +485,2 @@
GHOST_SetTitle(static_cast<GHOST_WindowHandle>(win->ghostwin), "Blender");
}
char str[sizeof(Main::filepath) + 24];
const char *filename = (BKE_main_blendfile_path_from_global()[0]) ?
Use
filepath
for full path names.@ -498,0 +487,4 @@
BKE_main_blendfile_path_from_global() :
IFACE_("(Unsaved)");
BLI_snprintf(str,
SNPRINTF
should still be used here.Actually I assumed that keeping the full path was a requirement. I would strongly prefer to show only the filename, although I do remember some users complaining of the thought.
Dropping the full path would allow us to move toward the idea of having our content in the space currently used by the OS caption bar.
@ -496,2 +485,2 @@
GHOST_SetTitle(static_cast<GHOST_WindowHandle>(win->ghostwin), "Blender");
}
char str[sizeof(Main::filepath) + 24];
const char *filepath = (BKE_main_blendfile_path_from_global()[0]) ?
Calling twice (while not a problem) is a bit odd, would just do:
const char *filepath = BKE_main_blendfile_path_from_global();
then have the ternary operator within the SNPRINTF statement.Having the filename only would likely be helpful for most people. Only when having two files open with the same name it would get confusing, since Blender can't handle multiple files open in the same instance it's impossible to know.
An alternative would be a mix of both, start with the filename, then folder in brackets, then version:
*01_03A.blend [/home/user/Desktop/folder/] - Blender 4.0.0 Alpha
But this would affect future development on:
But that's so far off that perhaps not something to worry at the moment.
Looks fine by itself.
Showing the folder second is unusual but maybe works well practice?
There are some ways to make the folder path shorter, showing just the parent folder, replacing the home directory with ~, or with future project support showing a path relative to the project root. But that still doesn't guarantee the name is short enough to show in the task bar. So not sure I actually like any of these ideas.
No consensus yet on the formatting. Some wanting full path, some just file name, others wanting a format that includes file name first and path later.
Pablo's suggestion does look nice and might work well with Projects:
There is consensus for hiding the trailing ".0" when there isn't a patch. This is contrary to Semantic Versioning 2.0.0, but the feeling was unanimous to not show this when not strictly needed.
They all have pros and cons.
Full Path (currently in
main
)Only Filename
Mixed
I would go with Mixed. Easy to see the filename at a glance, users can check the whole path if needed or discard the rest. Can get noisy but it just takes a moment to understand the structure of the important bits.
I'm fine with trying Mixed.
Updated to show the mixed format. Updated the captures in the first comment.
@ -121,0 +126,4 @@
"%d.%01d%s%s",
BLENDER_VERSION / 100,
BLENDER_VERSION % 100,
BLENDER_VERSION_PATCH > 0 ? "." STRINGIFY(BLENDER_VERSION_PATCH) : "",
I think the patch version should left out entirely from the title.
It's not important to distinguish Blender windows based on that. And showing it only when it is non-zero seems strange to me.
LGTM, if there are cases this doesn't work well it could always be a preference.
@blender-bot build
Hey guys. I'm glad to read in this discussion that it seems the
Mixed
format option was somewhat of an experiment and nobody seems hell-bent on it. I know that myself and at least 2 other people here at the studio aren't happy with this new format, possibly partially due to just being used to the old one, but I think it's also because it's simply harder to read and more confusing. When I glance at the top bar, it's almost like if the filepath was like this:MyAsset_temp.blend/D:/Work/SVN/Gold/Assets/MyAsset
.In some cases, it makes me briefly think that I have the wrong file open; Cases where there is a file named similarly to my folder, but that is not the file I intend to be in.
Sounds very specific, but take this file tree and consider how common it is:
Now if I'm in
MyAsset_temp.blend
(and it is very important to me that I am in that file and not the other), and I glance at the top-bar, the thing that reads most prominently is the end of the directory path, which will just beMyAsset
. So I easily get fooled into thinking that I'm inMyAsset.blend
, when that is not the case. This has been happening to me constantly since this change.So for mainly this reason, I would request either adding customizability to this, or going with the old
Full Path
format option described by Pablo above, and see if anybody complains about long filepaths not being handled nicely by their OS. (Couldn't we just add our own handling for long filepaths to cover this case, btw?)Personally the previous behavior seemed OK to me, we could revert it if there aren't any users who strongly prefer the new behavior. If some users prefer both new/old behavior +1 for making this customizable with the previous behavior as an option.
@Mets
I am also not a fan of the "mixed" format of having the filename followed by the path. This PR started with this as my suggestion:
It morphed into what we have now because some felt that the most important part, the file name, could be lost if the path is long and the screen is narrow.
I personally don't like what became the consensus because of the backwards order (name before path) and the brackets. Of course I am happy to implement the consensus, but I find it a bit awkward right now.
I'm actually not certain how best to raise this as an issue. Since you are in the Studio are you able to talk to Pablo?
Sure thing, thanks! I'll poke him on Monday to see if he favors the current format strongly, but I don't think that will be the case. 🤞