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.
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
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
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
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
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
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
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
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
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
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.
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.
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
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
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.
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.
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
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
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
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
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
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
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
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.
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
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
- 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.
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
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
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,
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
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.
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
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.
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.