UI: Open Folder of Recent Items #119988

Merged
Harley Acheson merged 6 commits from Harley/blender:RecentOpenExternal into main 2024-03-28 04:37:18 +01:00
Member

Add an item to the context menu when right-clicking on an item in the
"Open Recent" file list for "Open File Location" that opens that
location in an OS Explorer/Finder window.


image

Add an item to the context menu when right-clicking on an item in the "Open Recent" file list for "Open File Location" that opens that location in an OS Explorer/Finder window. --- ![image](/attachments/2f2dd6f0-937a-48c9-b044-5ced90f6ee9a)
Harley Acheson added 1 commit 2024-03-27 23:05:33 +01:00
43e7e66a3f UI: Open Folder of Recent Items
Add an item to the context menu when right-clicking on an item in the
"Open Recent" file list for "Open Folder" that opens that location in
an OS Explorer/Finder window.
Harley Acheson added this to the User Interface project 2024-03-27 23:05:45 +01:00
Harley Acheson requested review from Pablo Vazquez 2024-03-27 23:05:53 +01:00
First-time contributor

neat
how about go with the super popular "open file location" instead of just "open folder"?
sounds more clear imho

neat how about go with the super popular "open file location" instead of just "open folder"? sounds more clear imho
Harley Acheson added 2 commits 2024-03-28 00:18:53 +01:00
Hans Goudey reviewed 2024-03-28 01:24:49 +01:00
Hans Goudey left a comment
Member

Doesn't this assume that any "filepath" property on an operator has a string type?

That seems reasonable I guess, but I'd just make sure it doesn't crash if that's not the case.

Doesn't this assume that any "filepath" property on an operator has a string type? That seems reasonable I guess, but I'd just make sure it doesn't crash if that's not the case.
@ -1015,0 +1021,4 @@
PointerRNA props_ptr;
char dir[FILE_MAXDIR];
char file[FILE_MAXFILE];
BLI_path_split_dir_file(filepath, dir, sizeof(dir), file, sizeof(file));
Member

How about BLI_path_split_dir_part if this doesn't use file anyway?

How about `BLI_path_split_dir_part` if this doesn't use `file` anyway?
Harley marked this conversation as resolved
Harley Acheson added 2 commits 2024-03-28 02:44:25 +01:00
Author
Member

Doesn't this assume that any "filepath" property on an operator has a string type?
That seems reasonable I guess, but I'd just make sure it doesn't crash if that's not the case.

Good point! I updated it to make sure it is a string property and subtype of PROP_FILEPATH, as that is all that is needed for this.

> Doesn't this assume that any "filepath" property on an operator has a string type? > That seems reasonable I guess, but I'd just make sure it doesn't crash if that's not the case. Good point! I updated it to make sure it is a string property and subtype of PROP_FILEPATH, as that is all that is needed for this.
Hans Goudey approved these changes 2024-03-28 02:58:15 +01:00
Harley Acheson added 1 commit 2024-03-28 04:04:06 +01:00
buildbot/vexp-code-patch-lint Build done. Details
buildbot/vexp-code-patch-darwin-x86_64 Build done. Details
buildbot/vexp-code-patch-linux-x86_64 Build done. Details
buildbot/vexp-code-patch-windows-amd64 Build done. Details
buildbot/vexp-code-patch-darwin-arm64 Build done. Details
buildbot/vexp-code-patch-coordinator Build done. Details
bc2e87160a
Merge branch 'main' of projects.blender.org:blender/blender into RecentOpenExternal
Author
Member

@blender-bot build

@blender-bot build
First-time contributor

Very handy...
I don't if it's already the case, but if the file showed up selected in the explorer/finder, it would be a nice touch...

Very handy... I don't if it's already the case, but if the file showed up selected in the explorer/finder, it would be a nice touch...
Harley Acheson merged commit 6789a88107 into main 2024-03-28 04:37:18 +01:00
Harley Acheson deleted branch RecentOpenExternal 2024-03-28 04:37:20 +01:00
First-time contributor

if the file showed up selected in the explorer/finder, it would be a nice touch...

+1

> if the file showed up selected in the explorer/finder, it would be a nice touch... +1
First-time contributor

I don't if it's already the case

@TheRedWaxPolice just tested the feature, and no, the file doesn't show up selected

> I don't if it's already the case @TheRedWaxPolice just tested the feature, and no, the file doesn't show up selected
First-time contributor

@TheRedWaxPolice just tested the feature, and no, the file doesn't show up selected

Ah, too bad...
Thanks for the info..
I hope it can be added in the future...

> @TheRedWaxPolice just tested the feature, and no, the file doesn't show up selected Ah, too bad... Thanks for the info.. I hope it can be added in the future...
Author
Member

if the file showed up selected in the explorer/finder, it would be a nice touch..

For sure. That wouldn't be impossible, but we'd have to make something new rather than use WM_OT_path_open which I think is just using python to literally open the folder. If we made something for this purpose we'd have to make sure it worked for all platforms - on Windows I can definitely open a folder with a file selected but not sure about other OSs.

> if the file showed up selected in the explorer/finder, it would be a nice touch.. For sure. That wouldn't be impossible, but we'd have to make something new rather than use `WM_OT_path_open` which I think is just using python to literally open the folder. If we made something for this purpose we'd have to make sure it worked for all platforms - on Windows I can definitely open a folder with a file selected but not sure about other OSs.
First-time contributor

I can definitely open a folder with a file selected but not sure about other OSs.

It can't hurt, right? I mean, it wouldn't be the first time that a specific platform gets a feature first than the others...

> I can definitely open a folder with a file selected but not sure about other OSs. It can't hurt, right? I mean, it wouldn't be the first time that a specific platform gets a feature first than the others...
Author
Member

It can't hurt, right? I mean, it wouldn't be the first time that a specific platform gets a feature first than the others...

I agree. We have a few places where this could come in handy. Just needs new operator for "open file location". Let me give it a think.

> It can't hurt, right? I mean, it wouldn't be the first time that a specific platform gets a feature first than the others... I agree. We have a few places where this could come in handy. Just needs new operator for "open file location". Let me give it a think.
Sign in to join this conversation.
No reviewers
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#119988
No description provided.