Final Report - Improvements to the Blender macOS User Interface Experience - GSoC 2024
Summary
Over this summer, I got to work on improving the Blender macOS User Interface Experience. While the initial goal of the project was to add native macOS menubar support and inline titlebar decoration to Blender, the end goal ended up shifting towards more general macOS and general UI research, while still working on client-side window decorations, as outlined in this kickoff meeting note by my mentor Julian.
As such, this project ended up focusing on a new cross-platform API for client-side window decorations, combined with a practical colored titlebar macOS decoration implementation. I also worked on general macOS user experience and interface improvements, as well as backend refactors, while also experimenting with additional general UI enhancements.
Links and Process
During the project, I had regular weekly sync-up meetings with my mentor Julian, and for the first half of the project, my second co-mentor Farsthary. Towards the second half of the project, I also attended the bi-weekly UI module meetings, the notes of which you can find linked in the Weekly Reports.
Deliverables and Code
Colored Titlebar Decoration (macOS)
The main deliverable of this project, with probably the most impact on the Blender macOS end-user experience, are the Colored Titlebar Window Decorations. Providing native menu bar tinting to the Blender Window based on the current theme, blending the Blender window content with its titlebar, and improving its integration in the surrounding macOS environment.
Colored titlebar decoration before/after GIF, using the default Blender Theme and the macOS Light Theme to showcase the difference
Full macOS Titlebar Window Blending, featuring the Nordic Gold Theme
More Informations, Screenshots, and Implementation Details can be found in the Pull Request: macOS: Colored Titlebar Client-Side Decorations - GSoC 2024
Client-Side Decorations Window Manager API (General UI)
Another main deliverable of this GSoC project, and a byproduct of the Colored Titlebar Window Decoration implementation, is the creation of an expandable, flag-based, Window Manager Client-Side Decoration API. With the ability to create dynamic decorations based off the current Blender theme or window state, while also being as simple and platform-independent as possible. See the technical API overview for more details.
A great example of the use of this API, is the Proof-of-Concept implementation of the Colored Titlebar decoration on Windows 11 by Harley Acheson (@Harleya - many thanks!), using a minimum amount of Windows specific backend code, and sharing the same decoration logic as its macOS counterpart
See Harley’s PR comment for more details.
Objective-C Refactor (macOS)
To lay a solid foundation for future Blender macOS features, and modernize the (now more than 10 years old!) GHOST Cocoa backend, one of the main deliverables of this GSoC project is a global refactor of the Blender Objective-C code, which also serves as a proposal for a unified Objective-C code style. To help with code review, the final result was split into 5 Pull Requests, for a grand diff total of (+1781 -1887) lines (with some overlap between PRs).
- Main Tracking Issue #126772
- Remove unsound use of const in Objective-C code #126768
- Use idiomatic Obj-C objects for Window/App delegates #126767
- Autoreleasepool and property dot-notation refactor #126771
- Port
BLI_delete_soft
fromobjc_*
runtime calls to proper Obj-C #126766 - WindowViewCocoa refactor #126769
- General Code Style cleanups #126770
Color Picker Layout Rework (General UI)
Note: Work In Progress GIF — Final design is still under review and subject to change.
Pull Request: UI: Color Picker layout rework #125675
Image Copy / Pasting Support (macOS)
Pull Request: macOS: Add Image Clipboard Copy/Paste Support #126574
Splash Screen notice to warn against reduced performance on Rosetta (macOS)
Note: Work In Progress — Further layout experiments and discussions are needed, with the general idea being approved.
Pull Request: macOS: Implement a Splash Screen notice to warn against reduced performance on Rosetta - GSoC 2024 #124382
Bugfixes
- Window Titles
- Interactive Docking (See Feature Info Thread)
- General UI
- Small documentation nitpicks
Future Plans
Wrap up on-going work
Finish the code review of ongoing PRs, such as the UI: Color Picker layout rework, the macOS Rosetta Splash Screen Warning, etc…
Port old legacy client-side decorations Inline Titlebar experiment to the newly developed decoration API.
Legacy Inline Titlebar decoration experiment
Continue working on on-going experiments
- macOS Specific: Native Color Picker, Theme Auto-Switching, iCloud support, Full Multi-Monitor Window Placement Support, etc…
- General UI: Better main window titlebar, remove extra edges around main window
- Objective-C Refactor: Use modern Cocoa APIs, removing remaining legacy code, switching to ARC
- Color Related: New RGB node layout, Color Data-Block Drag-and-Drop in Node Tree, new Color Picker slider and wheel shapes
- Improvements to macOS Steam Deployment via Universal Binaries
- And more!
Thanks!
I would like to give a very warm thanks to everyone who supported me throughout this project, and most importantly to my mentor Julian Eisel, for his valuable guidance and feedbacks, and for keeping me motivated through regular sync-up meetings. As well as to my second co-mentor, Farsthary for his time and assistance during the first half of this project.
I would also like to thanks the Blender UI Module team, Pablo Vazquez for his interest in my works and his feedbacks, and especially Harley Acheson, for taking the time to answer my UI related questions, providing tons of useful feedbacks, and reviewing my code.
Finally I want to express my overall gratitudes to all the Blender Developers, and most importantly, the Blender Community. Looking forward to continue contributing to Blender and its beautiful user interface in the future!