Report/confirm overwrite of 'asset library' blendfiles. #117346

Merged
Bastien Montagne merged 5 commits from mont29/blender:bap-open-warning into brush-assets-project 2024-01-25 17:10:39 +01:00

This commit extends the reporting and overwrite confirmation system
created for blendfiles saved by later Blender version, to also detect
and handle 'asset library' blendfiles.

Asset library blendfiles are defined by:

  • Not have a defined current Screen or Scene in their global data.
  • Having a filename ending by .asset.blend.

This is required to avoid/warn users about editing a file that would have
been generated in the 'default' asset library, e.g. when saving a new Brush
asset (see also Part of #116337 and #117239).

The implementation details are fairly straightforward, but this commit
raises some design questions:

  • Do we care reporting in the status bar about the 'library blendfile'
    case? Unlike opening a more recent blender version blendfile, opening
    a library file has no loss of data.
  • When both issues are present (and potentially more in the future), do
    we want a merged info of all present issues, or do we define some sort
    of priority order, and only report the highest priority issue?

As it is right now, this commit can make both the status bar tooltip,
and the overwrite confirmation popup, fairly busy...

Obviously, naming and UI messages are also open for discussion.


Opening and trying to overwrite:

image
image

image
image

This commit extends the reporting and overwrite confirmation system created for blendfiles saved by later Blender version, to also detect and handle 'asset library' blendfiles. Asset library blendfiles are defined by: * Not have a defined current Screen or Scene in their global data. * Having a filename ending by `.asset.blend`. This is required to avoid/warn users about editing a file that would have been generated in the 'default' asset library, e.g. when saving a new Brush asset (see also Part of #116337 and #117239). The implementation details are fairly straightforward, but this commit raises some design questions: * Do we care reporting in the status bar about the 'library blendfile' case? Unlike opening a more recent blender version blendfile, opening a library file has no loss of data. * When both issues are present (and potentially more in the future), do we want a merged info of all present issues, or do we define some sort of priority order, and only report the highest priority issue? As it is right now, this commit can make both the status bar tooltip, and the overwrite confirmation popup, fairly busy... Obviously, naming and UI messages are also open for discussion. -------------------------- Opening and trying to overwrite: * A library .blendfile created by a future Blender version ([partiallib_blendver_4.5.asset.blend](/attachments/8739f49f-5370-4fda-8a36-0982f6c94760)): ![image](/attachments/ed64c33f-302d-489d-94c5-9b1bac3e1c06) ![image](/attachments/09f7436a-fe17-4749-b1a7-abdff4c2a821) * A library .blendfile created by current Blender version ([partiallib_blendver_4.1.asset.blend](/attachments/7b5c654d-1c21-4755-8e63-d62fd9072dcc)): ![image](/attachments/ab186c2f-f61a-4f0f-966c-851d5cc78a30) ![image](/attachments/f150a35e-fda1-4ebc-b8b3-9dcf62b34afa)
Bastien Montagne added 1 commit 2024-01-19 19:32:17 +01:00
f2a8008869 Protoype to report/confirm overwrite of 'library' blendfiles.
This commit extends the reporting and overwrite confirmation system
created for blendfiles saved by later Blender version, to also detect
and handle 'library' blendfiles (typically saved by partial-write API,
they do not have a defined current Screen or Scene in their global
data).

the implementation details are fairly straightforward, but this commit
raises some design questions:

* Do we care reporting in the status bar about the 'library blendfile'
  case? Unlike opening a more recent blender version blendfile, opening
  a library file has no loss of data.
* When both issues are present (and potentially more in the future), do
  we want a merged info of all present issues, or do we define some sort
  of priority order, and only report the highest priority issue?

As it is right now, this commit can make both the status bar tooltip,
and the overwrite confirmation popup, fairly busy...

Obviously, naming and UI messages are also open for discussion.
Bastien Montagne added this to the Brush Assets & Asset Shelf project 2024-01-19 19:32:45 +01:00

I would call this an "asset blend file". And the asset system would save these as xyz.asset.blend to emphasize that. We could change .asset.blend to .blend on file save perhaps.

I would explain the specific consequence for asset management in Blender. Maybe there are other tools that can do this in the future, but I think it detracts from the main message.

Idea for the wording:

Convert asset blend file to regular blend file?

This file is managed by the Blender asset system. By saving it
as a regular blend file, further editing must be done by opening
and editing the blend file.

It will no longer be possible to update the asset through the
asset browser.
I would call this an "asset blend file". And the asset system would save these as `xyz.asset.blend` to emphasize that. We could change `.asset.blend` to `.blend` on file save perhaps. I would explain the specific consequence for asset management in Blender. Maybe there are other tools that can do this in the future, but I think it detracts from the main message. Idea for the wording: ``` Convert asset blend file to regular blend file? This file is managed by the Blender asset system. By saving it as a regular blend file, further editing must be done by opening and editing the blend file. It will no longer be possible to update the asset through the asset browser. ```
Bastien Montagne added 2 commits 2024-01-23 17:57:20 +01:00
buildbot/vexp-code-patch-lint Build done. Details
buildbot/vexp-code-patch-linux-x86_64 Build done. Details
buildbot/vexp-code-patch-darwin-arm64 Build done. Details
buildbot/vexp-code-patch-darwin-x86_64 Build done. Details
buildbot/vexp-code-patch-windows-amd64 Build done. Details
buildbot/vexp-code-patch-coordinator Build done. Details
97504185eb
Update handling of 'data only' files from review.
Bastien Montagne changed title from WIP: Protoype to report/confirm overwrite of 'library' blendfiles. to WIP: Protoype to report/confirm overwrite of 'asset library' blendfiles. 2024-01-23 18:05:16 +01:00
Author
Owner

@blender-bot build

@blender-bot build
Bastien Montagne requested review from Brecht Van Lommel 2024-01-24 11:07:22 +01:00
Bastien Montagne requested review from Julian Eisel 2024-01-24 11:07:23 +01:00
Bastien Montagne requested review from Hans Goudey 2024-01-24 11:07:23 +01:00
Bastien Montagne changed title from WIP: Protoype to report/confirm overwrite of 'asset library' blendfiles. to Report/confirm overwrite of 'asset library' blendfiles. 2024-01-24 11:08:05 +01:00
Brecht Van Lommel approved these changes 2024-01-24 15:54:19 +01:00
Brecht Van Lommel left a comment
Owner

Fine with me if the text is changed.

Fine with me if the text is changed.
@ -6561,0 +6584,4 @@
tooltip_message += "\n\n";
}
tooltip_message += RPT_(
"This is an Asset Library Blender file, overwriting it\nmay break its handling by the "

I would use the same text as the confirmation popup, just replace "overwriting" by "editing". The message to convey is the same.

This file is managed by the Blender asset system
By editing it as a regular blend file, it will no longer
be possible to update its assets through the asset browser
I would use the same text as the confirmation popup, just replace "overwriting" by "editing". The message to convey is the same. ``` This file is managed by the Blender asset system By editing it as a regular blend file, it will no longer be possible to update its assets through the asset browser ```
mont29 marked this conversation as resolved
Bastien Montagne added 2 commits 2024-01-25 11:14:20 +01:00
Bastien Montagne merged commit dcc1894b89 into brush-assets-project 2024-01-25 17:10:39 +01:00
Bastien Montagne deleted branch bap-open-warning 2024-01-25 17:10:41 +01: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 Assignees
2 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#117346
No description provided.