Commit graph

58 commits

Author SHA1 Message Date
Dalai Felinto
e67acc8bf8 Revert "Assets: Add Webpage meta-data field"
This reverts commit 90b85d5d17.

While this feature was properly implemented, and "built to spec", the
decision to have it was bit rushed (by me).

For now we will not have this feature in 5.3. In the future we can
support this while adding more guardrails when users click on a link
that sends them to a non blender.org url.

I talked to Guillermo about it.
2026-09-21 14:35:01 +02:00
Guillermo Venegas
bad8871dc5 UI: Add UILayout::property_split_factor static value
This adds the `UILayout::property_split_factor` property which contains
the split factor used in the layout system, and avoids to use the this
as raw value all over the place.

Pull Request: https://projects.blender.org/blender/blender/pulls/163393
2026-09-09 00:27:44 +02:00
Guillermo Venegas
90b85d5d17 Assets: Add Webpage meta-data field
This adds the optional Webpage Asset Meta-data Field so asset authors
can set a custom URL where users can learn more about the asset.

See #162674

Pull Request: https://projects.blender.org/blender/blender/pulls/162809
2026-08-21 16:42:33 +02:00
Guillermo Venegas
c2acd5638e Assets: UI: Reduce default text-box height for asset metadata text button properties
This reduces vertical offset in the asset browser metadata editor.
See discussion in  #158145

Pull Request: https://projects.blender.org/blender/blender/pulls/162151
2026-08-02 00:42:54 +02:00
Guillermo Venegas
f4eca1c3c3 Assets: UI: Use text-box and multi-line labels for asset meta-data
This allows editing author, description, copyright, license fields with
text-box buttons which allows multi-line text editing, textbox state
would not be saved per asset.

Also this shows the asset meta-data as multi-line labels for assets
outside of the working file.

Pull Request: https://projects.blender.org/blender/blender/pulls/158145
2026-07-28 16:50:22 +02:00
Pablo Vazquez
0e5263ff5b UI: Replace use of Info, Warning, and Error icons
Instead of reusing `ERROR` for both warnings and errors, and the Info
Editor icon for "info" label comments, use the new icons from !161002.

* Use `STATUS_WARNING` when the code refers to simple warnings, the
  feature might still work.
* Use `STATUS_ERROR` when the code refers to incompatibility, broken
  functionality, general errors.
* Use `STATUS_INFO` for every info label. Keep `INFO` for the editor.
* Sometimes `WARNING_LARGE` was used, that should only be used for
  dialogs. Use the regular warning instead, it looks almost the same.
* When extra contrast is needed, the filled version is used.

Mostly no big visual changes, other than warnings that were meant as
actual errors using the proper icon now.

See !161038 for details and screenshots.

Pull Request: https://projects.blender.org/blender/blender/pulls/161038
2026-07-05 14:27:56 +02:00
Nika Kutsniashvili
1807650fcd UI: Persistent "Asset" menu in Asset Browser
Asset Browser didn't have "Asset" menu, but by default it was still
shown because "Pose Library" core add-on was registering it.
It resulted in this very weird menu which only has two pose-specific
operators, while general asset operators weren't in any menus besides
right-click one.

This PR registers Asset menu in Blender scripts directly, so that it
always exists, even without Pose Library, and also adds general asset
operators from context menu.

Additional benefits:
- Asset operators are now searchable with F3.
- Add-on creators can safely append their operators in the menu,
it won't bug out if Pose Library is disabled.

Pull Request: https://projects.blender.org/blender/blender/pulls/160068
2026-06-15 13:42:34 +02:00
Pablo Vazquez
cdcd4cf8a0 UI: File Browser: Add Show Hidden to View menu
"Show Hidden" (shortcut H) was missing from the View menu.
2026-06-10 15:44:17 +02:00
Pablo Vazquez
796fbeca99 UI: File Browser: Add icons to context menu
Most navigation buttons in the header have icons, add matching ones
to the context menu so the connection is more clear.

See !159780 for screenshots.

Pull Request: https://projects.blender.org/blender/blender/pulls/159780
2026-06-09 13:52:24 +02:00
Pablo Vazquez
ca6084f980 UI: Asset Browser: Add missing icons to menus
Add the usual icons to undo, redo, refresh, and save (catalogs).
2026-06-08 16:27:33 +02:00
Pratik Borhade
b378acbddf Fix: Missing add directory shortcut in UI description
This is due to idproperty mismatch between keymap and operator in UI
inside the function `wm_keymap_item_find_in_keymap()`.

See PR description for images

Pull Request: https://projects.blender.org/blender/blender/pulls/159619
2026-06-05 12:38:28 +02:00
Sybren A. Stüvel
80f65c3235 Assets: add "Open File Location" to asset browser context menu
Add a new operator "Open File Location" that opens the system's file
browser/explorer/finder on the directory that contains the asset's blend
file.

This is only supported for assets that have a file on disk, like local
asset libraries, the Current File library (when the file is saved), and
downloaded assets from a remote library.

It's implemented as a separate operator (instead of using `wm.path_open`
directly) so that it can have its own poll function.

Pull Request: https://projects.blender.org/blender/blender/pulls/159302
2026-05-29 17:58:10 +02:00
Pablo Vazquez
35f2ed44d6 UI: Add new Download icon and use it for assets
Add a new generic icon for downloads: `DOWNLOAD`, and use it for the
"Download Asset(s)" operators.

Little easter egg: the design is based on the old Blender Cloud logo :)

See !159300 for screenshots.

Pull Request: https://projects.blender.org/blender/blender/pulls/159300
2026-05-29 17:38:15 +02:00
Sybren A. Stüvel
a284dab166 Assets: Shift+Click refresh button to refresh remote asset listing
Introduce a new operator: Reload Remote Listing. It forces a re-download
of the asset library's remote asset listing.

`ASSET_OT_library_refresh` now has an 'invoke' function that checks for
the shift button, but only if the `use_shift_for_remote_listing` is
set. If shift is pressed, then the operator will call the Reload Remote
Listing operator to do its work.

This refresh mode is not supported for local asset libraries.

The Asset Browser now has a Library menu, with the existing Refresh and
the new Reload Remote Listing operators. This helps to make the new
functionality, otherwise hidden behind a shift press, discoverable.

Pull Request: https://projects.blender.org/blender/blender/pulls/159111
2026-05-29 09:43:57 +02:00
Julian Eisel
e428159ecc Assets: Allow setting preferred import method for assets
This makes it possible for asset authors to set a "preferred" import
method (link, append, packing) for individual assets.

This is important for base meshes in the essentials asset library:
Currently they would pack by default, meaning they are not editable.
Users would have to go through additional steps to make the base meshes
editable. Such "base" assets should just work well without additional
steps, especially ones from the essentials library.

Adds an _Import_ panel to the asset browser sidebar. It will only be
shown if the active asset is either in the current file, or preferred
import method was set by the asset author.

In the _Import Settings_ popover of the asset browser, the
_Follow Preferences_ import method was renamed to
_Follow Asset or Preferences_.

Co-authored-by: Sybren A. Stüvel <sybren@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/158486
2026-05-19 12:04:31 +02:00
Julian Eisel
886c1e2238 Assets: Expand filter option to allow showing only online assets
The previous "Online Assets" filter option was useful but some found the
name a bit awkward. Additionally, there is use in being able to show
only online assets. So solve both by changing the "Online Assets" filter
option into an "Access" menu with the three items:
- Online and Offline
- Online Only
- Offline Only

When either "Online Only" or "Offline Only" is selected and no assets
are shown, the Asset Browser will show an info message hinting at the
filter options.

Pull Request: https://projects.blender.org/blender/blender/pulls/158274
2026-05-12 14:29:32 +02:00
Julian Eisel
ac2d768724 Assets: Hide source path button for online assets
This button would show the path on disk of an asset .blend file, plus a
button to open the file. For online assets no such file exists, it needs
downloading still.
2026-04-21 18:10:11 +02:00
Julian Eisel
c856aed5a7 Assets: Allow downloading asset with already downloaded asset active
When selecting multiple assets, the "Download Assets" entry in the
context menu was only visible if the right-clicked on asset was not
downloaded yet. The operator downloads all selected assets if needed, so
it should instead be in the context menu when any of the selected assets
is online. Regardless of which one the context menu was spawned from.

The operator poll already does this correctly, the Python UI definition
was based on the active asset only. Instead of duplicating logic, use
the operator poll to decide if the operator should be visible in the
context menu.
2026-04-21 16:52:48 +02:00
Pratik Borhade
aa1d261cf9 Fix #157236: Python error on opening the navigation pie menu on the asset browser
Vertical list is excluded for asset browser in
`rna_FileSelectParams_display_type_itemf`. Add a check in pie menu
drawing to silent the error caused by vertical enumitem.

Pull Request: https://projects.blender.org/blender/blender/pulls/157262
2026-04-17 10:28:02 +02:00
Pablo Vazquez
97b0d68c1e UI: Add new icon for filter active
Add a new icon: `FILTER_FILLED`. A version of the existing `FILTER`
to be used when filtering is active/enabled.

Use it in places where we already have a `use_filter` property:
* File Browser
* Outliner
* Spreadsheet
* Get Extensions

See PR for details and screenshots.

Part of #148207

Pull Request: https://projects.blender.org/blender/blender/pulls/156303
2026-03-25 18:30:33 +01:00
Julian Eisel
06217a0473 Asset Browser: Move "Download Assets" first in context menu
After talking it through with Dalai, this is probably the most important
option in the menu for online assets. It also only shows up for online
assets, so it's not in the way when not available.
2026-02-20 17:13:28 +01:00
Julian Eisel
681e4ae46a Fix: "Online Assets" option visible with experimental feature disabled
The "Online Assets" filter option for the asset browser and the asset
shelf were visible even the the "Remote Asset Libraries" experimental
feature was disabled.
2026-02-20 12:54:51 +01:00
Julian Eisel
7c2ff868e3 Assets: Main remote asset library commit (Experimental Feature)
Part of the remote asset libraries project, see:
https://projects.blender.org/blender/blender/issues/134495

New functionality:
- Automatic daily updating of the asset library listing
- Loading and displaying remote asset libraries in the asset browser and
  asset shelf
- Filter flag for online assets in the asset browser and asset shelf
- Operator to download assets, available in context menu
- Prefetch handler to download assets when dragging is invoked
- "Downloading Asset..." hint when dragging assets being downloaded

Further notes:
- Assets that are still being downloaded cannot be dropped currently
  (releasing the mouse button does nothing). We might change this but
  the planned proper solution is some kind of "placeholder" data-block
  that gets replaced with the downloaded data-block once available.
- Downloading is done in Python (already committed), which then "pings"
  the asset system for status updates. This happens via the window
  manager currently, we might move this to a more dedicated asset system
  entry point.
- Asset/file browser previews for online assets use the UI preview
  loading system, not the asset/file browser one. Supporting online
  previews in the latter turned out tricky, plus it's redundant anyway.
  Asset/file browsers should switch to the UI system at some point.

A bunch of more isolated code for remote asset library support was
already committed, see PR for more context. This keeps this commit
smaller and more manageable. And a bunch of more general code was
already committed to `main` throughout the project.

Co-authored-by: Sybren A. Stüvel <sybren@blender.org>

Pull Request: https://projects.blender.org/blender/blender/pulls/153284
2026-02-13 16:32:51 +01:00
Pablo Vazquez
59c06c9791 UI: Assets: Use icon for Refresh Asset Library
Use the same refresh icon used in the library selector, for the
operator in the assets context menu.
2026-02-03 12:47:03 +01:00
Pablo Vazquez
0917f89c5d UI: Assets: Use blend file icon in Open Blend File
Always use the blend file icon for `asset.open_containing_blend_file`.
2026-02-03 12:47:03 +01:00
Harley Acheson
42b6c7f804 Fix #132460: Remove File Browser Path Validation
This PR removes validation of saved bookmarks and system paths in File
Browser. The act of checking validity of a path can result in a timeout
that can last many seconds. Blender will have a very long startup time
if any such items are disconnected, invalid, offline, or removed. Even
if these paths are not used during the Blender session, like network
shares used only at work, web storage for some non-Blender use, a
shortcut to a USB drive, etc. Items will not be greyed out, and
clicking on one will result in a timeout _at that time_ but this seems
like expected behavior.

Pull Request: https://projects.blender.org/blender/blender/pulls/138218
2025-08-12 21:22:52 +02:00
Trantor
665aff0797 UI: Change default height of bookmark UIList
Update bookmark UIList, so it appears same as Vertex Groups,
Shape Keys, etc. (by default 3 and 5 rows visible depending on
element count)

See images in PR description

Pull Request: https://projects.blender.org/blender/blender/pulls/141790
2025-07-23 11:00:49 +02:00
Nika Kutsniashvili
efa8d942b8 Refactor: Remove grid and compact UI list layout in Python scripts
The grid layout type for UI list is planned for removal in 5.0, see
blender/blender#110461.

In previous UI meetings, we talked about deprecating the Grid mode of
the UI list, which is not actually accessible in UI and was never used.
Nowadays, there is a new grid view that can be exposed in the API in
the future.

Initially, I wanted to remove references to layout_type in UI templates
in the text editor, because a lot of add-on developers on the
extensions platform base their lists on that code, and a lot of them
are therefore including soon to be deprecated code in their add-ons,
which I want to avoid in the future. But I thought we might as well
remove it from our python scripts as well, since it's just basically
redundant code that doesn't do anything. And also because many add-on
developers use bundled python scripts for references as well.

Pull Request: https://projects.blender.org/blender/blender/pulls/138395
2025-06-18 13:45:06 +02:00
Christoph Lendenfeld
5f5c06fc24 Assets: Create Asset thumbnails via a screenshot anywhere in Blender
This patch adds the option to take screenshots for asset previews.
Since the functionality lives inside an operator, the screenshot can only
be taken from within the GUI of Blender.

* The operator can be accessed from the dropdown menu in the asset
browser preview n-panel.
* It works for local assets and assets that are managed by blender
(e.g. brush assets)
* Click drag anywhere in Blender to create a capture
* Holding Space will move the capture area
* Holding Shift will unlock the aspect ratio
* On a re-run, the operator remembers it previous capture
area to easily create an identical screenshot
* If the screenshot is fully contained within a single 3D viewport,
the background will render transparent

Pull Request: https://projects.blender.org/blender/blender/pulls/132904
2025-05-20 13:56:45 +02:00
Pablo Vazquez
a97ce49298 Fix: Asset Browser: typo in Import Method popover 2025-05-14 16:37:54 +02:00
Nika Kutsniashvili
47f80eb158 UI: Improve labels of asset browser parameters
In new asset browser popover "Import Settings" there are new options
for instancing. Naming of properties wasn't clear enough at a glance, and
it reuses terms "Link" and "Append" which are used way too frequently and
can be mistaken for something else. This commit clarifies what parameters
do in labels.

See Images attached in PR description.

Pull Request: https://projects.blender.org/blender/blender/pulls/137295
2025-04-18 06:04:44 +02:00
Julian Eisel
6c1c5e8923 Asset browser import settings popover with collection instancing option
Part of #134755 / #134766.

Adds options to the new Import Settings popover (added in 7a6beb65f4)
to toggle collection instancing for dragging in collections. It can be
toggled separately for linking and appending, since it's typical to use
instancing for linking, but not appending (current default, also with
this change).

Previously, toggling collection instancing was only possible via the
Adjust Last Operation panel but this wasn't obvious, many people were
not aware. Adding this option based on feedback by the Blender Studio.

Pull Request: https://projects.blender.org/blender/blender/pulls/135996
2025-03-20 18:44:24 +01:00
Julian Eisel
7a6beb65f4 Asset Browser: Add import settings popover, move import method into it
Part of #134755 / #134766.

Replaces the current import method menu in the middle of the Asset
Browser header with a "Import Settings" popover. The import method is
located there now, because it doesn't need to be as prominent as it used
to be, especially with #104686.

Plan is to add further settings to this popover, e.g. see #135996 or
 #134943.
2025-03-18 17:49:44 +01:00
Julian Eisel
4499fad40e UI: Horizontal list view for asset browser
Part of #134755 / #134766.

The asset browser currently lacks a compact view that leaves names
readable. Especially when managing asset libraries (e.g. to prepare it
for sharing or set up a production library), this is quite a usability
issue. A column view like the file browser has can solve this, allowing
a quick overview and fast browsing of libraries, while keeping names
readable.

Adds a new "Horizontal List" display mode to the asset browser that
distributes assets over multiple columns, with horizontal scrolling.
Asset previews are shown in this mode, plus an asset type icon if
there's enough space. The size of previews and the columns can be
configured next to the display mode, for optimizing the display.

Pull Request: https://projects.blender.org/blender/blender/pulls/135306
2025-03-14 16:43:12 +01:00
IREXTIA
24d9eedc15 UI: Rename 'Inverse' to 'Invert' in File/Asset Browser
Rename 'Inverse' to 'Invert' for consistency with other select menus.

Pull Request: https://projects.blender.org/blender/blender/pulls/134514
2025-02-19 21:51:55 +01:00
Campbell Barton
c7804568e7 Cleanup: reference imported types in class definitions 2025-02-13 10:15:19 +11:00
dupoxy
40b0185a8e UI: Add asset browser option to remove the preview of asset
Allow user to remove the preview of an asset from the asset browser details region.
Additionally, user can now reuse the default icons after adding a preview.

Pull Request: https://projects.blender.org/blender/blender/pulls/132575
2025-01-16 20:32:40 +01:00
Campbell Barton
be0c9174aa Cleanup: argument wrapping for Python scripts
- Wrap the closing parenthesis onto it's own line
  which makes assignments to the return value
  read better.
- Reduce right-shift with multi-line function calls.
2025-01-14 12:53:32 +11:00
Julian Eisel
f49d0390a1 UI: Add asset browser option to sort by catalogs, new default
So far asset browsers always sorted assets by name, which resulted in
barely related assets being placed together, and related assets being
scattered. This can make navigating assets tedious, and introduces a lot
of visual noise because of scattered preview image styles.

Related assets are typically put into common asset catalogs, and related
catalogs are typically organized close to each other in the catalog
hierarchy. This makes catalogs a better characteristic to sort by,
solving the mentioned issues.

For asset shelves sorting by catalogs was introduced in 471378c666. This
PR exposes this feature to the asset browser, by introducing a new
option to sort either by name or by catalog. The new default is sorting
by catalog. Within a single catalog, assets are still sorted alphabetically.

Pull Request: https://projects.blender.org/blender/blender/pulls/129480
2024-10-29 16:58:49 +01:00
Philipp Oeser
77f874ae1d Fix #123782: Asset Browser does not show tags for active asset
Caused by a6ed013baa

Tags live on the `AssetMetaData` of an `AssetRepresentation` (so
`metadata` in py),
`asset_data`(also pointing to `AssetMetaData`) is a member of
`FileSelectEntry` only [which the above commit tried to get rid off...]

Pull Request: https://projects.blender.org/blender/blender/pulls/123818
2024-06-27 10:57:33 +02:00
Julian Eisel
a6ed013baa Refactor: Get asset data via asset representation, not file
The "active_file" context member as a way to get the active asset should be
avoided, in favor of "asset". This moves us away from the file browser backend
as basis of the asset system,
2024-06-05 13:46:33 +02:00
Nika Kutsniashvili
ede675705e UI: Reorganize 'Select' menus in editors
Reorganizes (and in some cases add missing operators to) all 'Select'
menus in all editors except 3D Viewport (done in a separate patch).

The goal of this change is to make menus as consistent as possible, and
to group & sort items according to a certain logic, which should be easy to
remember and users can always expect certain items to be always at same
place in every editor.

More details and images in the pull request.

Pull Request: https://projects.blender.org/blender/blender/pulls/121337
2024-05-13 16:27:23 +02:00
Campbell Barton
56388dc8fe Cleanup: reduce right-shift in startup scripts
Also un-wrap lines that fit in the column width.
2024-04-30 12:46:05 +10:00
Campbell Barton
d07d6f1c10 Cleanup: un-wrap lines that fit within 120 width for Python scripts 2024-03-15 10:04:03 +11:00
Julian Eisel
ca2a8be15f Assets: Rename "Import Type" to "Import Method" in code/BPY
It was already called that way in the UI, since it's referring to a
behavior, not a type. Update the code to match that. Note that this is
a BPY compatibility breaking change for 4.0.
2023-09-26 16:48:47 +02:00
Pablo Vazquez
05fc31f27f UI: Remove redundant "Context Menu" in menu titles
Context menus are a type of menu, like header menus, there is no need to mention
the type as part of the name since it is implied by context.

Pull Request: https://projects.blender.org/blender/blender/pulls/112662
2023-09-25 16:25:55 +02:00
persun
90d8a07213 UI: Move "Reset Recent" inside a menu
Move the File Browser's `Reset Recent` button into a menu to prevent
accidental clicks of a destructive operation.

Also rename it to a more descriptive  `Clear Recent Items`, and since
the word "Reset" is used for resetting values to default.

Pull Request: https://projects.blender.org/blender/blender/pulls/112853
2023-09-25 15:15:53 +02:00
Harley Acheson
0dab5818d7 UI: Discrete Thumbnail Sizes for Menus
Allow menus to select thumbnail sizes in discrete steps.

Pull Request: https://projects.blender.org/blender/blender/pulls/112455
2023-09-22 18:49:01 +02:00
Julian Eisel
974d70918b RNA/BPY: Replace asset_library_ref with asset_library_reference
This is a compatibility breaking change to rename all usages of the name
`asset_library_ref` with `asset_library_reference`. Brecht recently
suggested that such abbreviations should be avoided in public API names.
2023-09-19 16:27:07 +02:00
Julian Eisel
591a1ae323 Assets: Remove (almost) all usages of asset handle in Python scripts
The asset handle type is supposed to be replaced by the asset
representation type. It is designed for the asset system as opposed to
the file browser backend. With d421ebac5e, d04cd3f3e6 and f6a6b27ac1, it
can now do everything that is needed in Python to be a replacement.

With this commit the asset handle type and the file handle type it uses
is almost entirely replaced in Python files (only for the asset view
template we require a collection property taking asset handles still,
for internal reasons.)

Part of #102877 and #108806.
2023-09-19 14:41:34 +02:00