Command Click on title bar to reveal file path is gone in 4.0 #112978

Closed
opened 2023-09-27 21:47:15 +02:00 by Christopher Tyler · 7 comments

#System Information
Operating system: macOS-13.4.1-arm64-arm-64bit 64 Bits
Graphics card: Metal API Apple M1 Pro 1.2

Blender Version
Broken: version: 4.0.0 Alpha, branch: main, commit date: 2023-09-25 21:53, hash: 2aa393e72771
Worked: 3.6

Short description of error
In 3.6, you can Command+Click on the title bar to see a pathway to the file and then to reveal the file.
4.0 now shows a pathway to the file, but we've lost the useful ability to actually reveal the file in the finder.

Exact steps for others to reproduce the error

  • Open a .blend file in Blender 4.0
  • In the title bar, where the file name is, press the command key and LMB

Nothing happens.

#**System Information** Operating system: macOS-13.4.1-arm64-arm-64bit 64 Bits Graphics card: Metal API Apple M1 Pro 1.2 **Blender Version** Broken: version: 4.0.0 Alpha, branch: main, commit date: 2023-09-25 21:53, hash: `2aa393e72771` Worked: 3.6 **Short description of error** In 3.6, you can Command+Click on the title bar to see a pathway to the file and then to reveal the file. 4.0 now shows a pathway to the file, but we've lost the useful ability to actually reveal the file in the finder. **Exact steps for others to reproduce the error** - Open a .blend file in Blender 4.0 - In the title bar, where the file name is, press the command key and LMB Nothing happens.
Christopher Tyler added the
Status
Needs Triage
Type
Report
Priority
Normal
labels 2023-09-27 21:47:16 +02:00

This is also the case on an Intel iMac with macOS 12.6.9

This is also the case on an Intel iMac with macOS 12.6.9

I can confirm.
It appears to be a regression (otherwise it might be by design).
I'll look for the commit that introduced the problem.

I can confirm. It appears to be a regression (otherwise it might be by design). I'll look for the commit that introduced the problem.

The problem was introduced in 636f3697ee

To make it clearer, before it was like this:
GIF.gif

After the commit it looked like this:
Captura de Tela 2023-09-29 às 14.01.54.png

@Harley, can you take a look?

The problem was introduced in 636f3697ee To make it clearer, before it was like this: ![GIF.gif](/attachments/a4636514-d0b6-4a5d-81f1-2e4f13444e24) After the commit it looked like this: ![Captura de Tela 2023-09-29 às 14.01.54.png](/attachments/7af67689-88f0-4008-befe-57fee24fa84e) @Harley, can you take a look?
Member

@mano-wii - It appears to be a regression (otherwise it might be by design)

Although this change of the title format was intentional (we wanted to show the dirty * mark for unsaved files, show "(Unsaved)" when unsaved, wanted the filename earlier in the title and to add the blender version later), this breaks some special formatting in the Apple ghost code.

In blender\intern\ghost\intern\GHOST_WindowCocoa.mm in GHOST_WindowCocoa::setTitle there is special behavior when setting the title. It appears that this command-click behavior is from the use of setRepresentedFilename

Current code is looking for the prefix "Blender" and then locating the full pathname within "[" and "]". It then alters the title to not include the path, and sends the full pathname to setRepresentedFilename. This now fails because "Blender" is no longer a prefix and it is only the path, not including file name, within [].

In order to get back to previous, or similar, result will require someone who compiles for Apple to alter this section of code. Probably altering the hasPrefix "Blender" to using firstIndex or something for a "Contains". Constructing the pathname from the portion between [] and appending the first part, sending that to setRepresentedFilename and altering the title to something that makes sense for the platform. Ideally still using "Unsaved", the dirty mark, and showing version, but personally I prefer whatever is most normal for the platform.

Is this something you are interested in @jenkm ?

> @mano-wii - It appears to be a regression (otherwise it might be by design) Although this change of the title format was intentional (we wanted to show the dirty * mark for unsaved files, show "(Unsaved)" when unsaved, wanted the filename earlier in the title and to add the blender version later), this breaks some special formatting in the Apple ghost code. In `blender\intern\ghost\intern\GHOST_WindowCocoa.mm` in `GHOST_WindowCocoa::setTitle` there is special behavior when setting the title. It appears that this command-click behavior is from the use of `setRepresentedFilename` Current code is looking for the prefix "Blender" and then locating the full pathname within "[" and "]". It then alters the title to not include the path, and sends the full pathname to `setRepresentedFilename`. This now fails because "Blender" is no longer a prefix and it is only the path, not including file name, within []. In order to get back to previous, or similar, result will require someone who compiles for Apple to alter this section of code. Probably altering the hasPrefix "Blender" to using firstIndex or something for a "Contains". Constructing the pathname from the portion between [] and appending the first part, sending that to `setRepresentedFilename` and altering the title to something that makes sense for the platform. Ideally still using "Unsaved", the dirty mark, and showing version, but personally I prefer whatever is most normal for the platform. Is this something you are interested in @jenkm ?

I can say as a user that the Command+Click behavior revealing the path and showing the file is far more useful than simply having the path shown in the title bar. If solving this means going back to 3.6 behavior I'm all for that.

I can say as a user that the Command+Click behavior revealing the path and showing the file is far more useful than simply having the path shown in the title bar. If solving this means going back to 3.6 behavior I'm all for that.
Member

I can say as a user that the Command+Click behavior revealing the path and showing the file is far more useful than simply having the path shown in the title bar. If solving this means going back to 3.6 behavior I'm all for that.

For sure, and that is always an option. But let's try to fix it first.

> I can say as a user that the Command+Click behavior revealing the path and showing the file is far more useful than simply having the path shown in the title bar. If solving this means going back to 3.6 behavior I'm all for that. For sure, and that is always an option. But let's try to fix it first.

I think we could change the parameters from:

  • void GHOST_SetTitle(GHOST_WindowHandle windowhandle, const char *title)

to:

  • void GHOST_SetTitle(GHOST_WindowHandle windowhandle, const char *window_name, const char *file_dir)

and each implementation could handle the file_dir at its own way.

I think we could change the parameters from: - `void GHOST_SetTitle(GHOST_WindowHandle windowhandle, const char *title)` to: - `void GHOST_SetTitle(GHOST_WindowHandle windowhandle, const char *window_name, const char *file_dir)` and each implementation could handle the `file_dir` at its own way.
Blender Bot added
Status
Resolved
and removed
Status
Confirmed
labels 2023-10-05 02:27:11 +02:00
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#112978
No description provided.