Assets: Add initial new display_name metadata. #115918

Open
Bastien Montagne wants to merge 4 commits from mont29/blender:tmp-assets-uiname into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.

If defined, display names are used instead of the asset name (i.e. ID name)
when showing the asset to the user, in the UI (e.g. in the asset
browser).

Unlike ID names, they are not expected to be unique, and should not be
used for asset reference.


Some open questions:

  • Naming (label looks good to me, but we could also use ui_name...).
  • Do we keep the name field in assets metadata editing UI (this one just edit the ID name)?
  • Somewhat related, do we automatically pre-fill the new label data with the ID name by default?
If defined, display names are used instead of the asset name (i.e. ID name) when showing the asset to the user, in the UI (e.g. in the asset browser). Unlike ID names, they are not expected to be unique, and should not be used for asset reference. ----------------- Some open questions: - Naming (`label` looks good to me, but we could also use `ui_name`...). - Do we keep the `name` field in assets metadata editing UI (this one just edit the ID name)? - Somewhat related, do we automatically pre-fill the new `label` data with the ID name by default?
Bastien Montagne added 1 commit 2023-12-07 22:32:41 +01:00
04a9612810 Assets: Add initial new `label` metadata.
If defined, labels are used instead of the asset name (i.e. ID name)
when showing the asset to the user, in the UI (e.g. in the asset
browser).

Unlike ID names, they are not expected to be unique, and should not be
used for asset reference.
Bastien Montagne requested review from Julian Eisel 2023-12-07 22:32:55 +01:00
Julian Eisel requested changes 2023-12-08 12:14:52 +01:00
Julian Eisel left a comment
Member

I don't think the term "Label" is clear for users, neither is "UI Name". They don't see the distinction between data and UI that we do. I think "Display Name" is better. If internally we call it display_name or ui_name I don't mind so much.

Ideas:
image
This shows both a "Display Name" and a "Data-block Name". The placeholder text (placeholder="...") is used to hint at the relation to the display name. Maayybe this last part can be confusing, but I think it can be useful.

Instead of "Data-block Name" it could also be "Identifier", or "Unique Name", or "Data Name", but I think at least for IDs it's good to communicate that this is the ID name.

I don't think the term "Label" is clear for users, neither is "UI Name". They don't see the distinction between data and UI that we do. I think "Display Name" is better. If internally we call it `display_name` or `ui_name` I don't mind so much. Ideas: ![image](/attachments/9d715ca6-4abb-476c-87c1-73526683b457) This shows both a "Display Name" and a "Data-block Name". The placeholder text (`placeholder="..."`) is used to hint at the relation to the display name. Maayybe this last part can be confusing, but I think it can be useful. Instead of "Data-block Name" it could also be "Identifier", or "Unique Name", or "Data Name", but I think at least for IDs it's good to communicate that this is the ID name.
@ -543,0 +581,4 @@
"rna_AssetMetaData_label_length",
"rna_AssetMetaData_label_set");
RNA_def_property_ui_text(
prop, "Label", "A UI name, if set it will replace the data-block namein the user interface");
Member

For users it's not clear what a "UI Name" is, I wouldn't use that term in a tooltip. (Also typo in there: "namein")

Think I'd describe it more like this:
"Show this name instead of the unique data-block name when displaying it as an asset. Note that this name will not be used for imported instances of an asset"

For users it's not clear what a "UI Name" is, I wouldn't use that term in a tooltip. (Also typo in there: "namein") Think I'd describe it more like this: "Show this name instead of the unique data-block name when displaying it as an asset. Note that this name will not be used for imported instances of an asset"
Member

Note that this would be the UI for editable, i.e. current file assets. For external assets, I think we would always display the ID name (grayed out, like currently) since it will be relevant once the asset gets imported, and the display name only when it is set, like we do for other metadata.

Note that this would be the UI for editable, i.e. current file assets. For external assets, I think we would always display the ID name (grayed out, like currently) since it will be relevant once the asset gets imported, and the display name only when it is set, like we do for other metadata.
Bastien Montagne added 3 commits 2023-12-09 13:49:35 +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-x86_64 Build done. Details
buildbot/vexp-code-patch-darwin-arm64 Build done. Details
buildbot/vexp-code-patch-windows-amd64 Build done. Details
buildbot/vexp-code-patch-coordinator Build done. Details
71a36925ea
Address review comments.
Author
Owner

@blender-bot build

@blender-bot build
Bastien Montagne changed title from WIP: Assets: Add initial new `label` metadata. to Assets: Add initial new `label` metadata. 2023-12-09 13:50:37 +01:00
Bastien Montagne changed title from Assets: Add initial new `label` metadata. to Assets: Add initial new `display_name` metadata. 2023-12-09 13:50:56 +01:00
Some checks failed
buildbot/vexp-code-patch-lint Build done.
buildbot/vexp-code-patch-linux-x86_64 Build done.
buildbot/vexp-code-patch-darwin-x86_64 Build done.
buildbot/vexp-code-patch-darwin-arm64 Build done.
buildbot/vexp-code-patch-windows-amd64 Build done.
buildbot/vexp-code-patch-coordinator Build done.
This pull request has changes conflicting with the target branch.
  • source/blender/blenkernel/intern/asset.cc
  • source/blender/editors/asset/intern/asset_indexer.cc

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u tmp-assets-uiname:mont29-tmp-assets-uiname
git checkout mont29-tmp-assets-uiname
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
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#115918
No description provided.