UI: Asset Shelf (Experimental Feature) #104831

Closed
Julian Eisel wants to merge 399 commits from asset-shelf into main

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

399 Commits

Author SHA1 Message Date
Julian Eisel 1325adfe69 Merge branch 'main' into asset-shelf 2023-08-03 17:22:39 +02:00
Julian Eisel a1d1bc43ee Remove changes to be committed separately
buildbot/vexp-code-patch-coordinator Build done. Details
This is now solely focused on introducing the asset shelf internally, 3D
View support and the UI template will be committed separately.
2023-08-03 16:18:43 +02:00
Julian Eisel ebb13a9de0 Merge remote-tracking branch 'origin/main' into asset-shelf 2023-08-03 16:06:38 +02:00
Julian Eisel 7b61dde976 Fix earlier active asset shelf exposed in context when poll fails 2023-08-03 14:56:22 +02:00
Campbell Barton 041503dd98 Correct property name after RNA rename 2023-08-03 20:37:33 +10:00
Julian Eisel 8c584cb7ae Address points from review (except feature request) 2023-08-03 12:33:34 +02:00
Campbell Barton 9572bfe883 Add asset shelf to the region toggle pie menu 2023-08-03 11:01:12 +10:00
Julian Eisel c46a390bd8 Merge remote-tracking branch 'origin/main' into asset-shelf 2023-08-02 21:10:08 +02:00
Julian Eisel 182deed791 Avoid slight text flashing while clicking assets 2023-08-02 20:50:31 +02:00
Julian Eisel 50259e62bf Show loading icon while loading previews, and type icon if no preview 2023-08-02 20:48:31 +02:00
Julian Eisel 4093e3c6db Merge branch 'main' into asset-shelf
buildbot/vexp-code-patch-coordinator Build done. Details
2023-08-02 15:36:24 +02:00
Julian Eisel eb4b74e8dc Cleanup: Remove outdated TODO comment 2023-08-01 13:04:16 +02:00
Julian Eisel 061469eb90 Make asset poll callback non-temporary design
While this was initially meant as temporary design, I think it's fine to
keep this. It adds more flexibility in removing unwanted assets from the
listing. Plus it's unclear if we can get the necessary Python API syntax
to work before the release, so I prefer not relying on that. Should we
get it to work, the API can still be changed before the release.
2023-08-01 12:58:46 +02:00
Julian Eisel 29e1e91bb1 Merge branch 'main' into asset-shelf 2023-08-01 12:48:33 +02:00
Julian Eisel c10be0165e Don't assume 3D View for asset shelf data reading/writing 2023-07-28 17:36:25 +02:00
Julian Eisel efdf201477 Use same padding horizontally as is used vertically 2023-07-28 16:46:45 +02:00
Julian Eisel df0816430d Merge remote-tracking branch 'origin/main' into asset-shelf 2023-07-28 15:27:16 +02:00
Julian Eisel 7b1da46441 Rename `AssetShelfHook` to `RegionAssetShelf`
New name makes sense since this is now region data instead of space
data.
2023-07-28 15:11:48 +02:00
Julian Eisel ef1f6f0388 Cleanup: Use bool instead of integer 2023-07-28 14:51:38 +02:00
Julian Eisel 45367db7c9 Cleanup: Use nullptr in RNA C++ files 2023-07-28 14:49:39 +02:00
Julian Eisel 83a0641fcd Remove now unnecessary change for layout based region drawing 2023-07-28 14:46:41 +02:00
Julian Eisel 8409f72d76 Merge remote-tracking branch 'origin/main' into asset-shelf 2023-07-28 14:37:10 +02:00
Julian Eisel 40dea52498 Remove now unnecessary changes to pass context to drag data creation 2023-07-28 12:28:55 +02:00
Julian Eisel f23bee61d1 Merge remote-tracking branch 'origin/main' into asset-shelf 2023-07-28 12:22:45 +02:00
Julian Eisel 7b63ed0006 Merge remote-tracking branch 'origin/main' into asset-shelf 2023-07-28 11:27:50 +02:00
Julian Eisel 4095dcdd44 Remove now unnecessary changes 2023-07-27 18:20:04 +02:00
Julian Eisel 0d6572f452 Move asset shelf storage to asset shelf region data
Quite nice how this isolates/encapsulates things even more.
2023-07-27 18:15:05 +02:00
Julian Eisel 4bb3435225 Rename settings region to header region 2023-07-27 15:18:25 +02:00
Julian Eisel 877c2d53fd Address various points from review 2023-07-27 15:04:00 +02:00
Julian Eisel 77505cf416 Quiet warning about empty asset shelf keymap 2023-07-27 14:54:58 +02:00
Julian Eisel f7ab83d558 Fix crash when duplicating 3D view with asset shelf in "All" tab 2023-07-27 14:54:26 +02:00
Julian Eisel 4beaf1531d Fix crash with no custom context menu is set for asset shelf type 2023-07-27 14:53:36 +02:00
Julian Eisel 652745ea73 Merge branch 'main' into asset-shelf 2023-07-27 11:55:33 +02:00
Julian Eisel 587a6ed21b Merge remote-tracking branch 'origin/main' into asset-shelf 2023-07-25 16:47:35 +02:00
Julian Eisel 09cf4924cc Merge branch 'main' into asset-shelf 2023-07-25 16:38:07 +02:00
Campbell Barton f4fbb08900 Merge branch 'main' into asset-shelf 2023-07-20 21:27:28 +10:00
Campbell Barton 92ce664442 Merge branch 'main' into asset-shelf 2023-07-20 13:06:31 +10:00
Campbell Barton f56b23106c Merge branch 'main' into asset-shelf 2023-07-20 09:57:59 +10:00
Campbell Barton acd818f1f3 Merge branch 'main' (early part) into asset-shelf 2023-07-20 09:57:54 +10:00
Campbell Barton bdcc9b247a Merge branch 'main' (early part) into asset-shelf 2023-07-20 09:57:50 +10:00
Campbell Barton cceec5afb2 Merge branch 'main' (early part) into asset-shelf 2023-07-20 09:57:45 +10:00
Campbell Barton 4363e6a0e4 Merge branch 'main' (early part) into asset-shelf 2023-07-20 09:57:41 +10:00
Campbell Barton 2adce2cd3f Merge branch 'main' (early part) into asset-shelf 2023-07-20 09:57:36 +10:00
Campbell Barton 7b5f822d3c Fix #107838: accelerator keys fail in enums/menus spawned from popups
Enum popups don't set an active button so accelerator keys didn't work.
Always use accelerator keys in popups because these are typically
launched from non-menus (the redo popup for e.g.) where it doesn't
make sense to pass the event to the parent.
2023-07-19 16:52:34 +10:00
Jason Fielder cfa69a843d EEVEE Next: Ensure correct resource usage flags for Metal
Shader write must be correctly specified where required for
shaders which perform direct image and buffer writing operations.

Authored by Apple: Michael Parkin-White

Pull Request: #110219
2023-07-19 16:52:34 +10:00
Omar Emara 8e8cb41cb8 Fix #109676: GPU compositor crashes on muting output nodes
The Realtime GPU compositor crashes when muting output or viewer nodes.

This happens because output nodes are scheduled regardless of their
muted statued, however, the initial reference count takes the muted
status into account, resulting in a use after free error, hence the
crash.

To fix this, we simply do not schedule muted output nodes.
2023-07-19 16:52:34 +10:00
YimingWu 8457840c45 Fix #110176: Grey out "Flip" in mirror modifier when "Bisect" is off
"Flip" option in mirror modifier is only effective for when "Bisect" is
enabled, thus grey out the flip option when it's ineffective to avoid
confusion on the user interface.

Pull Request: #110191
2023-07-19 16:52:33 +10:00
Alexander Gavrilov 235861d5fb Mesh Edit: implement X symmetry in the Propagate To Shapes operator.
Since the operator affects shape keys rather than current mesh
coordinates, this only symmetrizes the selection.

Pull Request #105421
2023-07-19 16:52:33 +10:00
Alexander Gavrilov 4983c7242f Mesh Edit: implement X symmetry in the Blend From Shape operator.
This symmetrizes selection and vertex positions like any other operator.

Pull Request #105421
2023-07-19 16:52:33 +10:00
nutti bdf6dd2a39 Docs: Fix layout of bpy.types.Object Python API documents
Fix the layout of Python API documents of bpy.types.Object.
2023-07-19 16:52:33 +10:00
Alexander Gavrilov 24b9d2b8ca Shape Key editing: propagate updates through basis chains.
It is possible to organize shape keys into a tree through the
reference key setting. Mesh editing and sculpting a reference
key is supposed to update all its children, but this was only
done for one level of dependencies.

This changes the code to retrieve the complete set of dependent
keys and update them all.
2023-07-19 16:52:33 +10:00
Miguel Pozo a1470baead Cleanup: EEVEE Next: Clarify sampling rng functions usage
Pull Request: #110221
2023-07-19 16:52:33 +10:00
Colin Marmond 25c7adabce Fix #110155: Hiding entire overlay does not hide node previews
Pull Request: #110163
2023-07-19 16:52:33 +10:00
Philipp Oeser e6df4c5d28 Fix #110204: Anim Player draws non-uniformly scaled when resizing window
Caused by fd3e44492e.

Images were drawn filling the entire window, now use available size/
offset inside the window and pass these as `rctf` to
`draw_display_buffer`.

Should be good for 3.6/3.3 LTS

Pull Request: #110206
2023-07-19 16:52:33 +10:00
Falk David efc861b83b Fix: Compiler error on macOS
Use `math::max` instead of `std::max`.
2023-07-19 16:52:33 +10:00
Jeroen Bakker 14520d7e56 Cleanup: Make format 2023-07-19 16:52:33 +10:00
Falk David 13dbca115c Fix: Compiler error
The file `ED_curves.h` no longer exists and is now `ED_curves.hh`.
2023-07-19 16:52:33 +10:00
Jeroen Bakker 727c45c0c7 Fix: Eevee-next world only probe didn't update
When scenes only have a world probe the world probe had several
artifacts.

- The first sample didn't update the world.
- When switching between viewports the world didn't get updates
- When rendering it ignored the resolution that was set by the user

The reason was that the ubo was only updated when the probes where
synced. This PR adds an exception to also update when there is only
the world probe.

Pull Request: #110238
2023-07-19 16:52:33 +10:00
Amélie Fondevilla 8e1b3fe087 GPv3: Stroke smoothing operator
Implementation of the smoothing operator for grease pencil strokes.
Works on `CurvesGeometry` position and other attributes, such as radius.

Based on the gaussian blur like algorithm in `BKE_gpencil_stroke_smooth_point` by Henrik Dick.

Pull Request: #109635
2023-07-19 16:52:33 +10:00
Lukas Tönne 66a9a6b2f4 Nodes: Move node socket RNA definition into its own file.
This is a fairly verbose part of nodes RNA, which defines the base
NodeSocket and NodeSocketInterface types as well as all the subtypes
required for showing correct properties based on socket type.

The RNA for this part of nodes is quite self-contained, so moving it
to a separate files works well and reduces the overall size of
rna_nodetree.cc considerably (~1700 LoC). This does not include any
functional changes.

Moving this to a separate file will make it easier to improve the node
group interface (#109135).

Pull Request: #110220
2023-07-19 16:52:33 +10:00
Martijn Versteegh 395a83b2ae Fix #110164: Trigger spreadsheet redraw on animation pause
When playing and then pausing the animation the spreadsheet would show stale data,
not only during playback but also afterwards.

Pull Request: #110224
2023-07-19 16:52:33 +10:00
Campbell Barton 74a650163c BLI_linklist_stack: restore type safety without needing explicit casts
Add casts back into the macro (removed in [0]), removing the need for
them to be manually included, use `decltype(..)` for C++.

[0]: 129f78eee7
2023-07-19 16:52:33 +10:00
Jeroen Bakker 755bc39238 Fix: Eevee-next LOD selection
The LOD selection for reflection probes wasn't correct and would
select a noisier texture than required. This change will improve
the LOD selection making less noise in the rendered image.

Pull Request: #110234
2023-07-19 16:52:33 +10:00
Campbell Barton 955a2f9234 Cleanup: correct struct member comments 2023-07-19 16:52:33 +10:00
Campbell Barton 2dd1a0dacd Cleanup: struct member comments for DrawEngineType & RenderEngineType 2023-07-19 16:52:33 +10:00
Campbell Barton f16c476c32 code checker: add 'make check_struct_comments'
This utility uses Python's clang module to validate comments intended
to match the struct member names. `cmake_static_check_clang.py` has
been written to support adding other checkers in the future.
2023-07-19 16:52:33 +10:00
Campbell Barton f0cee5c850 Cleanup: use C++ function style casts, NULL -> nullptr 2023-07-19 16:52:33 +10:00
Campbell Barton 39a405f891 Cleanup: quiet warnings 2023-07-19 16:52:33 +10:00
Ray molenkamp 9fccdbcf5e Cleanup: Make format 2023-07-19 16:52:33 +10:00
Colin Marmond 03ac481454 Refactor: use ImBuf instead of a raw buffer for compositor previews
In order to better suit the upcoming changes of shader node previews, this
patch replaces the old implementation of the storage of the compositor
previews. It also prevents memory loss for future modification.

BKE_node_preview_clear_tree was removed as it is no longer needed and
will not be used by the new shader node previews.

Pull Request: #110064
2023-07-19 16:52:33 +10:00
Kaspian Jakobsson deaa44453c Fix #109679: Normal Map node strength interpolation artifacts
Previously the normal strength linearly interpolated and extrapolated
the normal in world space. Instead do it in tangent space, in a way
that ensure the normal remains above the surface and valid.

Pull Request: #109763
2023-07-19 16:52:33 +10:00
Harley Acheson 7bb22a2c1c Cleanup: Make format
Removing unnecessary whitespace added with 1b1349cee4
2023-07-19 16:52:32 +10:00
Julian Eisel 55f0e16999 Remove unused function 2023-07-17 20:18:56 +02:00
Julian Eisel 166af87035 In-between state for catalog checkbox when it contains enabled child
buildbot/vexp-code-patch-coordinator Build done. Details
2023-07-17 20:09:21 +02:00
Julian Eisel cc079803aa Merge branch 'main' into asset-shelf 2023-07-17 19:38:03 +02:00
Julian Eisel 4dfa8b78cb Fix crash when toggling "Names" option in asset shelf with sidebar open 2023-07-17 17:22:19 +02:00
Julian Eisel 17420c1e66 Merge branch 'main' into asset-shelf 2023-07-17 11:36:58 +02:00
Julian Eisel 19881697a1 Merge branch 'main' into asset-shelf 2023-07-13 15:04:44 +02:00
Julian Eisel 01e3f76b9f UI: Make grid view visible items calculations more stable
No user visible changes expected.

Previously the calculations to skip building the layout for invisible
items used the scrolling offsets quite a bit. These require floating
point math and are managed in other code. So better to minimize use of
this to make code locally more clear & reliable.
2023-07-13 14:45:35 +02:00
Julian Eisel 3d073a1998 Merge branch 'main' into asset-shelf 2023-07-13 14:09:59 +02:00
Julian Eisel a2cf9a3386 Fix crash when splitting then merging 3D views 2023-07-12 18:22:36 +02:00
Julian Eisel 0a827cb07d Quick label tooltip for asset shelf 2023-07-12 17:22:25 +02:00
Julian Eisel 5c4c6e468c Adjust region size when toggling "Show Name" option 2023-07-12 15:10:43 +02:00
Julian Eisel 62a295bd93 Preview size option 2023-07-12 15:06:23 +02:00
Julian Eisel a3dc52be8c Update to changes in main 2023-07-11 15:45:55 +02:00
Julian Eisel 0b06db979b Merge branch 'main' into asset-shelf 2023-07-11 15:34:27 +02:00
Julian Eisel 8b253cdb8b Merge branch 'main' into asset-shelf 2023-07-10 12:57:08 +02:00
Julian Eisel 1a809193d5 Uncollapse root level catalogs in the catalog selector
buildbot/vexp-code-patch-coordinator Build done. Details
2023-07-07 12:13:55 +02:00
Julian Eisel b773d3e660 Gray out catalog names of disabled catalogs 2023-07-07 12:09:52 +02:00
Julian Eisel adbef033d5 Move checkboxes to the right 2023-07-07 12:05:55 +02:00
Julian Eisel c81fd2cb6c Make asset shelf use full area width, cut into sidbar/toobar
Going a bit back and forth here, but in latest tests we've decided to
try this again.
2023-07-06 18:27:16 +02:00
Julian Eisel 8bbe25c650 Merge branch 'main' into asset-shelf 2023-07-06 17:13:44 +02:00
Julian Eisel 5d0634b3c0 Hide scrollbar when not needed 2023-07-06 15:10:02 +02:00
Julian Eisel 4b1865c245 Show info label in catalog selector when no applicable assets are found 2023-07-06 15:00:44 +02:00
Julian Eisel 2be740492b Hide catalogs without applicable assets from catalog selector 2023-07-06 14:51:06 +02:00
Julian Eisel 522aecd7b5 Turn footer into a header 2023-07-06 12:47:25 +02:00
Julian Eisel 9d1a3b68dc Merge branch 'main' into asset-shelf 2023-07-06 12:20:11 +02:00
Julian Eisel b6ec445c6a Merge branch 'main' into asset-shelf 2023-07-05 18:04:36 +02:00
Julian Eisel 0070e05e00 Remove separately submitted changes for azone offset (see #109753) 2023-07-05 17:52:12 +02:00
Julian Eisel 2640c0acad Update to changes in main branch
buildbot/vexp-code-patch-coordinator Build done. Details
2023-07-05 17:03:02 +02:00
Julian Eisel 538eb63437 Merge branch 'main' into asset-shelf 2023-07-05 15:27:41 +02:00
Julian Eisel f4a21e3d20 Merge branch 'main' into asset-shelf 2023-07-03 15:58:42 +02:00
Julian Eisel 024f375567 Avoid rather sneaky overriding of operator context in context menu 2023-07-03 15:52:12 +02:00
Julian Eisel 03a41c2b6f Merge branch 'main' into asset-shelf 2023-07-03 15:16:23 +02:00
Julian Eisel 9e014326d5 Merge branch 'main' into asset-shelf 2023-06-26 18:00:23 +02:00
Julian Eisel 4a5322e085 Merge branch 'main' into asset-shelf 2023-06-22 15:08:51 +02:00
Julian Eisel 8df3127b97 Merge branch 'main' into asset-shelf 2023-06-20 17:37:14 +02:00
Julian Eisel 1a2b54eb58 Update rna additions to compile in C++
These RNA files are now compiled in C++, some adjustments were
necessary.
2023-06-20 11:40:05 +02:00
Julian Eisel 801b01ba01 Merge branch 'main' into asset-shelf 2023-06-20 11:32:53 +02:00
Julian Eisel 0c0b5432d5 Merge branch 'main' into asset-shelf 2023-06-19 18:36:27 +02:00
Julian Eisel 60be0a43ec Merge branch 'main' into asset-shelf 2023-06-16 14:14:59 +02:00
Julian Eisel 02bc4296f7 Remove region clamping change from #109027 2023-06-16 11:27:38 +02:00
Julian Eisel 902384291f Merge branch 'temp-but-cpp-apply-func' into asset-shelf 2023-06-15 19:20:39 +02:00
Julian Eisel 7bca31aeab Merge branch 'main' into asset-shelf 2023-06-15 19:20:28 +02:00
Julian Eisel 7bef102322 Merge branch 'main' into temp-but-cpp-apply-func 2023-06-15 19:16:24 +02:00
Julian Eisel 3a2739ba10 Address review comments 2023-06-15 19:15:38 +02:00
Christoph Lendenfeld 165f73103d Refactor: draw fcurve bezt function
No functional changes

In preparation to tackle the following 2 Todos
*  TODO: view scale should factor into this someday too...
* TODO: optimize this to not have to calc stuff out of view too?

I did the following cleanup
* extracted drawing code for `BEZT_IPO_BEZ` into a separate function
* extracted code that calculates the resolution between 2 points into a separate function
* cleaned up comments
* renamed variables to have a more telling name
* moved variables closer to where they are used
* added `const` where possible

Pull Request: #108748
2023-06-15 19:11:54 +02:00
Julian Eisel 1dabda2c49 Merge branch 'temp-but-cpp-apply-func' into asset-shelf 2023-06-15 18:40:45 +02:00
Julian Eisel a7ab1733d4 Merge branch 'main' into temp-but-cpp-apply-func 2023-06-15 18:09:15 +02:00
Julian Eisel 0e3a77fdc0 Avoid paranoid explicit 0 initialization
Rather assert that these are initialized as expected.
2023-06-15 18:02:01 +02:00
Julian Eisel ab4c0d3875 Add comment 2023-06-15 17:46:49 +02:00
Julian Eisel 86b2cf4574 UI: Add type-safe C++ button apply function object
No user visible changes expected.

Rather than relying on a C-style function pointer with void pointer
arguments, allow storing a `std::function` object, which can hold
arbitrary data in a type safe way. This can be conveniently used with
lambdas, e.g. from #104831:
```
UI_but_func_set(but, [&shelf_settings](bContext &C) {
  shelf::settings_set_all_catalog_active(shelf_settings);
  shelf::send_redraw_notifier(C);
});
```

This is not used yet, but will be with #104831 merged. Replacing the
existing C-style callback with this can be done separately.
2023-06-15 16:35:22 +02:00
Julian Eisel 0352963040 Merge branch 'main' into asset-shelf 2023-06-15 16:13:30 +02:00
Julian Eisel b4d7352a17 Cleanup: Use const 2023-06-13 18:19:06 +02:00
Julian Eisel f41c2e9300 Merge branch 'main' into asset-shelf 2023-06-13 18:18:54 +02:00
Julian Eisel e2d20b1f79 Fix compile error from previous merge 2023-06-13 18:08:13 +02:00
Julian Eisel 7acb04e880 Merge branch 'main' into asset-shelf 2023-06-13 18:03:59 +02:00
Julian Eisel 327bed9477 Remove changes from #108892
This is handled in a separate PR now.
2023-06-13 17:49:38 +02:00
Julian Eisel 1bacc69871 Merge branch 'main' into asset-shelf 2023-06-13 17:38:11 +02:00
Julian Eisel 9ca39993ba Cleanup: Remove unnecessary context (`evil_C`) storage 2023-06-12 13:00:32 +02:00
Julian Eisel fae7fd2acf Cleanup: Remove dysfunctional filtering keymap item
Wouldn't work since e8a89e6eca (intentionally so).
2023-06-12 12:54:16 +02:00
Julian Eisel 0a35cd1b64 Merge branch 'main' into asset-shelf 2023-06-12 12:46:34 +02:00
Julian Eisel 2db15ce82c Cleanup: Remove now unused function 2023-06-12 12:26:03 +02:00
Julian Eisel 0b0e7297f1 Correct keymap after previous commit 2023-06-12 12:19:26 +02:00
Julian Eisel e8a89e6eca Only enable filtering on Ctrl+F to hovered view
Previously this allowed looking up a view to filter in in any region of
the current area, so Ctrl+F from the asset shelf footer would be
possible. However in own experiments this didn't really add much, so
rather keeping it simple now.
2023-06-12 12:15:59 +02:00
Julian Eisel c13ab04280 Cleanup: Remove `using namespace`s, correct comment 2023-06-12 11:31:51 +02:00
Julian Eisel 9837c846f7 Merge branch 'main' into asset-shelf 2023-06-09 17:23:32 +02:00
Julian Eisel 543d248f0b Fix compile errors after merge, update to changes in main 2023-06-09 16:32:24 +02:00
Julian Eisel 0474dcef8e Merge branch 'main' into asset-shelf 2023-06-09 16:32:06 +02:00
Julian Eisel cbcc807289 Asset system: Add public functions for asset identifier query
No user visible changes expected.

This is needed in #104831 but makes sense to expose publicly in the
asset system APIs either way. So committing this to the main branch
already.
2023-06-08 19:01:21 +02:00
Leon Schittek a8450121d1 UI: Correct default width of toolbars
Correct default initial widths of toolbars

Pull Request: #108292
2023-06-08 19:00:55 +02:00
Julian Eisel 59a1394435 Cleanup: Merge path query with new query from main branch 2023-06-08 18:39:33 +02:00
Julian Eisel 5292a80dce Merge branch 'main' into asset-shelf 2023-06-08 18:25:16 +02:00
Julian Eisel 9e339152ff Merge branch 'main' into asset-shelf 2023-06-08 17:41:09 +02:00
Julian Eisel 86e72999dd Add Ctrl+F to filter in the asset shelf 2023-06-08 17:16:45 +02:00
Bastien Montagne db5b41ed6f Merge branch 'main' into asset-shelf 2023-06-08 15:22:10 +02:00
Julian Eisel cf2809b645 Merge branch 'main' into asset-shelf
buildbot/vexp-code-patch-coordinator Build done. Details
2023-06-06 19:18:39 +02:00
Julian Eisel ebe4408d3d More general cleanup 2023-06-06 16:31:48 +02:00
Julian Eisel 510e216055 Remove branch only versioning
Was only needed for own test files saved in earlier versions.
2023-06-06 16:21:39 +02:00
Julian Eisel 81ee8de0b1 General branch cleanup, preparing for review 2023-06-06 16:19:11 +02:00
Julian Eisel 0adb48f9fa Ensure asset shelf exposes right asset library reference in context
Otherwise the workspace default would be used.
2023-06-06 13:15:20 +02:00
Julian Eisel 0a741e5759 Cleanup: Comments & remove unnecessary defaults change 2023-06-06 12:59:15 +02:00
Julian Eisel 966dcb2ec0 Avoid warning, general cleanup 2023-06-06 12:18:32 +02:00
Julian Eisel f3057757f6 Avoid need to sync subversion with main branch 2023-06-06 12:15:56 +02:00
Julian Eisel 61d65dc569 Merge branch 'main' into asset-shelf 2023-06-06 11:22:34 +02:00
Julian Eisel c8ea7b0572 Add asset shelf UI template 2023-06-05 16:26:51 +02:00
Julian Eisel 2074d2682b Add missing filtering support to tree-view 2023-06-05 16:26:51 +02:00
Julian Eisel f52fcdca5b Merge branch 'main' into asset-shelf 2023-06-05 15:35:18 +02:00
Julian Eisel f504527b27 Merge branch 'main' into asset-shelf 2023-05-31 17:06:07 +02:00
Julian Eisel 4b1208ffde Merge branch 'main' into asset-shelf 2023-05-31 12:26:53 +02:00
Julian Eisel 8848a78111 Add name filtering, supports wildcard searching
- No Ctrl+F shortcut to activate search yet.
- No filtering by tags yet.
2023-05-24 22:17:32 +02:00
Julian Eisel c12ac8bef6 Merge branch 'main' into asset-shelf
buildbot/vexp-code-patch-coordinator Build done. Details
2023-05-22 17:04:08 +02:00
Julian Eisel c2e0623ad1 Add an asset shelf for brushes in sculpt mode (experimental)
Only shows up when both the "Asset Shelf" and the "Extended Asset
Browser" experimental features are enabled.
2023-05-22 17:02:27 +02:00
Julian Eisel be08d78272 Fix editors sharing active shelf settings after splitting 2023-05-22 17:02:10 +02:00
Julian Eisel 85575edb11 Make shelf settings instance based
It's now possible to have multiple asset shelf types registered for
different contexts (e.g. sculpt mode vs. texture paint mode vs. pose
mode) and the settings are kept separate. For this a proper concept of
an active asset shelf is introduced. Basically only one asset shelf can
be active at a time, but we keep multiple shelves in storage, so we can
switch between them while all settings are preserved.
2023-05-22 15:53:29 +02:00
Julian Eisel 61482f9c6d Add toggle for asset shelf to View menu
buildbot/vexp-code-patch-coordinator Build done. Details
2023-05-19 16:53:36 +02:00
Julian Eisel 0bef07e9c5 Hide asset shelf theme settings if experimental option is disabled 2023-05-19 16:53:23 +02:00
Julian Eisel b94de0f35e Add experimental option for asset shelf 2023-05-19 15:41:06 +02:00
Julian Eisel 4d1752fa81 Update version bump after changes in main
buildbot/vexp-code-patch-coordinator Build done. Details
2023-05-19 14:39:06 +02:00
Julian Eisel 816a926164 Merge branch 'main' into asset-shelf 2023-05-19 14:36:44 +02:00
Julian Eisel 3e70549e70 Add context menu to asset shelf
In the Python asset shelf type definition, a `draw_context_menu()`
function can be defined now.
2023-05-18 01:47:07 +02:00
Julian Eisel 67db4448de Make overriding asset drag for pose blending work
buildbot/vexp-code-patch-coordinator Build done. Details
Adds a `bl_option` to asset shelf type definitions to disable the
default asset dragging (`NO_ASSET_DRAG`), so the drag event can be
overridden by custom keymap items.
2023-05-18 00:24:57 +02:00
Julian Eisel 1fd5097d03 Fix possible crash on file read
buildbot/vexp-code-patch-coordinator Build done. Details
2023-05-17 23:16:02 +02:00
Julian Eisel 34b33dee07 Fix: Applying pose through redo last operation not working
AFAIK this doesn't work in master either. Issue is that the operator
relies on context that is only available in the asset shelf region (or
with the mouse over the asset-view template). So the correct region has
to be restored for redo to make this work.
2023-05-17 23:13:44 +02:00
Julian Eisel 322388c5f2 Get pose asset applying on click to work using keymap 2023-05-17 22:49:16 +02:00
Julian Eisel 345eef6433 Disable undo for catalog tabs 2023-05-17 19:18:47 +02:00
Julian Eisel 342b33fd10 Update versioning after version bump 2023-05-17 18:43:53 +02:00
Julian Eisel 6ddda24332 Merge branch 'asset-shelf' into temp-asset-shelf-grid-view 2023-05-17 18:43:25 +02:00
Julian Eisel 2d3675b59c Update versioning after version bump 2023-05-17 18:34:02 +02:00
Julian Eisel ec275484b7 Merge branch 'main' into asset-shelf 2023-05-17 18:31:56 +02:00
Julian Eisel b4c93b10ae Fix double highlight of grid tiles 2023-05-17 16:22:51 +02:00
Julian Eisel a48aaa4c96 Merge branch 'asset-shelf' into temp-asset-shelf-grid-view
buildbot/vexp-code-patch-coordinator Build done. Details
2023-05-17 11:38:01 +02:00
Julian Eisel 86d22f45a0 Update version bump after changes in main 2023-05-17 11:37:28 +02:00
Julian Eisel 59db839cee Merge branch 'main' into asset-shelf 2023-05-17 11:31:02 +02:00
Julian Eisel 4adcdd4874 Fix undefined behavior when splitting 3D View with asset shelf open 2023-05-15 20:23:33 +02:00
Julian Eisel 27190e0f90 Fix crash when opening toolshelf popup 2023-05-15 20:19:20 +02:00
Julian Eisel 72e42a8774 Merge branch 'asset-shelf' into temp-asset-shelf-grid-view 2023-05-15 20:01:47 +02:00
Julian Eisel 29c0a9ea1d Bump subversion after change in main 2023-05-15 20:01:12 +02:00
Julian Eisel a3235ab26a Merge branch 'main' into asset-shelf 2023-05-15 20:01:03 +02:00
Julian Eisel 3c3cc48018 Rename "Show Names" checkbox to "Names"
Avoid redundancy. Part of #107881.
2023-05-12 16:00:28 +02:00
Julian Eisel aad8edbb1f Display title and box in asset catalog selector
Part of #107881.
2023-05-12 15:57:58 +02:00
Julian Eisel 000eee0376 Merge branch 'asset-shelf' into temp-asset-shelf-grid-view 2023-05-12 15:23:50 +02:00
Julian Eisel da5b2b9c8d Merge branch 'main' into asset-shelf 2023-05-12 15:23:38 +02:00
Julian Eisel 93f65d70c3 Merge branch 'asset-shelf' into temp-asset-shelf-grid-view
buildbot/vexp-code-patch-coordinator Build done. Details
2023-05-10 19:02:44 +02:00
Julian Eisel 24d3d815e3 Update version bump 2023-05-10 19:01:58 +02:00
Julian Eisel 113cae8466 Merge branch 'main' into asset-shelf 2023-05-10 19:01:25 +02:00
Julian Eisel ed2f8731f3 Enable item mouse hover highlight for the catalog selector popover
View items now always display mouse hover highlight, regardless of the
embossing (might want to give more precise control for this though).

- Made the active state of items visible, so had to add a way to disable
  that.
- Had to make the view item mouse hover highlight work in popups.
2023-05-10 18:18:23 +02:00
Julian Eisel 157cc9b171 Turn catalog selector popup into popover, for consistency
Enables the triangle showing this popup was spawned from a button, uses
more padding (consistent with other popovers) and simplifies code.
2023-05-10 18:11:59 +02:00
Julian Eisel 16f1f1cc96 Decrease size of asset shelf footer some more 2023-05-10 18:09:58 +02:00
Julian Eisel a0a13c78c1 Disable transparency for asset shelf regions
Feedback is that this looks a bit odd, so rather keep it disabled.
2023-05-10 18:09:10 +02:00
Julian Eisel 0a1c2059a0 Merge branch 'asset-shelf' into temp-asset-shelf-grid-view
buildbot/vexp-code-patch-coordinator Build done. Details
2023-05-05 16:34:27 +02:00
Julian Eisel bcc6f368b3 Merge branch 'main' into asset-shelf 2023-05-05 16:34:16 +02:00
Julian Eisel 508eada719 Merge branch 'main' into temp-asset-shelf-grid-view 2023-05-05 16:33:47 +02:00
Julian Eisel 9ef337ba95 Fix offset in region scaling hotspot
An offset was applied for transparent regions, so the hotspot is closer
to where the user expects (closer to the visual content). But this only
makes sense if the background is actually transparent or close to at
least.
2023-05-02 18:01:40 +02:00
Julian Eisel e635ee1188 Disable region zooming
We want to support different preview sizes, but the regular region
zooming makes things overly complicated (because of the pagination
and region size snapping mostly). Plus region zooming would usually zoom
text as well. So the preview size is better managed separately.
2023-05-02 16:59:21 +02:00
Julian Eisel 527e4e2be7 Ensure shelf size is snapped correctly on DPI changes 2023-05-02 16:53:17 +02:00
Julian Eisel c3b36345c7 Basic paginated vertical scrolling
This means the view always scrolls by a full row, so that asset previews
are never partially in view.

The paginated scrolling is implemented as a standard View2D feature.
This doesn't work well with zooming yet, and it's tricky to get that to
work right.
2023-05-02 15:35:21 +02:00
Julian Eisel ee49a28335 Merge branch 'asset-shelf' into temp-asset-shelf-grid-view 2023-05-02 15:19:29 +02:00
Julian Eisel 60585f8b5e Update for subversion bump in main 2023-05-02 15:11:53 +02:00
Julian Eisel 0f5853e293 Cleanup: Clang-format after formatting config changes in main 2023-05-02 15:10:34 +02:00
Julian Eisel da51074f1c Merge branch 'main' into asset-shelf 2023-05-02 15:09:45 +02:00
Julian Eisel 486ff75da7 Improve how default size is set
Set the default size later as part of regular area/region setup, when
DPI is available. Also use `uiStyle` paddings.
2023-05-01 16:20:45 +02:00
Julian Eisel fc86ef91e9 Update version patch for new subversion 2023-05-01 15:50:06 +02:00
Julian Eisel 040ecfa45f Use fixed width for grid-view items, don't stretch to full width
This just makes the UI feel more "stable" since things don't move around
as much anymore.
2023-05-01 12:46:27 +02:00
Julian Eisel 813843b473 Merge branch 'asset-shelf' into temp-asset-shelf-grid-view 2023-05-01 12:31:26 +02:00
Julian Eisel bb6685d1d8 Merge branch 'main' into asset-shelf 2023-05-01 12:28:46 +02:00
Bastien Montagne c2309356c6 Merge branch 'main' into asset-shelf 2023-04-21 11:02:31 +02:00
Bastien Montagne e6387349d6 Merge branch 'main' into asset-shelf 2023-04-20 11:39:28 +02:00
Bastien Montagne 565af18e9e Merge branch 'main' into asset-shelf 2023-04-18 11:17:44 +02:00
Julian Eisel 6340d47454 Draw a scrollbar for the main asset shelf region 2023-04-14 14:40:57 +02:00
Julian Eisel 5fc17af505 Make new "Show Names" option work 2023-04-14 13:03:43 +02:00
Julian Eisel d676d7cc44 Merge branch 'asset-shelf' into temp-asset-shelf-grid-view 2023-04-14 12:51:40 +02:00
Julian Eisel 2acf304e14 Add display popover and "Show Names" option 2023-04-14 12:50:54 +02:00
Julian Eisel eca4cf0bdf Merge branch 'asset-shelf' into temp-asset-shelf-grid-view 2023-04-14 12:02:16 +02:00
Julian Eisel 5c15bcac30 Merge branch 'main' into asset-shelf 2023-04-14 12:02:02 +02:00
Julian Eisel 12e019055f Merge branch 'asset-shelf' into temp-asset-shelf-grid-view 2023-04-13 16:00:25 +02:00
Julian Eisel 00b689c357 Merge branch 'main' into asset-shelf 2023-04-13 15:57:48 +02:00
Julian Eisel 41d8c3944d Decrease default asset preview size in asset shelf 2023-04-12 20:11:53 +02:00
Julian Eisel 0cf345a673 Use slight transparency for asset shelf by default
Looks visually more appealing IMHO.
2023-04-12 20:06:47 +02:00
Julian Eisel 6e713bbdb3 Support region overlap for entire asset shelf, fix overlapping regions 2023-04-12 19:35:24 +02:00
Julian Eisel be8a76df53 Merge branch 'asset-shelf' into temp-asset-shelf-grid-view 2023-04-12 17:32:57 +02:00
Julian Eisel a3baa62487 Fix uninitialized asset shelf theme color in existing theme 2023-04-12 17:25:14 +02:00
Julian Eisel 73a2c3453c Fix error when re-registering a `bpy.types.AssetShelf` subclass 2023-04-12 17:20:26 +02:00
Bastien Montagne 21ae01b7eb Merge branch 'main' into asset-shelf 2023-04-12 16:25:33 +02:00
Bastien Montagne 5efe4a32ff Merge branch 'main' into asset-shelf 2023-04-12 15:18:05 +02:00
Julian Eisel 7938d4f4d0 Merge branch 'asset-shelf' into temp-asset-shelf-grid-view 2023-04-11 18:34:08 +02:00
Julian Eisel 4b06cabf1e Update for subversion bump in main branch 2023-04-11 18:29:04 +02:00
Julian Eisel 45a8625088 Merge branch 'main' into asset-shelf 2023-04-11 18:27:24 +02:00
Julian Eisel 84d8b88e22 Update for subversion bump in main branch 2023-04-11 18:07:50 +02:00
Julian Eisel 07a99afdd3 Merge branch 'main' into temp-asset-shelf-grid-view 2023-04-11 17:46:20 +02:00
Bastien Montagne 512994fbdb Merge branch 'main' into asset-shelf 2023-04-07 16:03:14 +02:00
Julian Eisel 0a742fd749 Reduce size of asset shelf footer/header a bit
A bit more space efficient this way, and looks better IMO.
2023-04-07 15:28:26 +02:00
Bastien Montagne 8c3fe5cf23 Merge remote-tracking branch 'upstream/main' into asset-shelf 2023-04-07 14:34:25 +02:00
Julian Eisel 108f4859ec Merge branch 'asset-shelf' into temp-asset-shelf-grid-view 2023-04-07 13:09:28 +02:00
Julian Eisel b93fe0f9e0 Add "All" catalog tab that is always visible 2023-04-07 13:09:14 +02:00
Julian Eisel b35dd323c3 Remove unnecessary & problematic header layout changes
Was only needed for the old asset shelf main region implementation, and
caused some issues (e.g. too small buttons in status bar).
2023-04-07 12:14:05 +02:00
Julian Eisel 0e93c4ad36 Merge branch 'asset-shelf' into temp-asset-shelf-grid-view 2023-04-07 11:58:48 +02:00
Julian Eisel b7a9fed4bc Change default color for asset shelf footer/header 2023-04-07 11:58:11 +02:00
Julian Eisel d067e77ee6 Fix wrong theme setting used for asset shelf footer/header 2023-04-07 11:57:36 +02:00
Julian Eisel 927f482d29 Merge branch 'asset-shelf' into temp-asset-shelf-grid-view 2023-04-07 11:39:29 +02:00
Julian Eisel 253b417225 Add theme options for the asset shelf 2023-04-07 11:38:37 +02:00
Julian Eisel 5116450f45 Merge branch 'asset-shelf' into temp-asset-shelf-grid-view 2023-04-06 12:11:42 +02:00
Julian Eisel 455deed475 Merge branch 'main' into asset-shelf 2023-04-06 12:10:56 +02:00
Julian Eisel e813afe7c5 Show asset shelf regions by default as soon as poll succeeds 2023-04-05 16:24:29 +02:00
Julian Eisel 657ae8ccab Merge branch 'asset-shelf' into temp-asset-shelf-grid-view 2023-04-05 16:16:04 +02:00
Julian Eisel 2e288dad63 Use new region poll to remove asset shelf based on context 2023-04-05 16:10:23 +02:00
Julian Eisel 8f74d10ee9 Merge branch 'main' into asset-shelf 2023-04-05 15:55:28 +02:00
Julian Eisel 852becd76c Support and use custom page size for scrolling whole rows in asset shelf 2023-04-03 17:33:13 +02:00
Bastien Montagne 5797c4944d Merge branch 'main' into asset-shelf 2023-04-03 16:03:31 +02:00
Julian Eisel 32c080f65a Support zooming in the asset shelf 2023-04-03 15:48:36 +02:00
Julian Eisel 6da90998e2 Snap asset shelf region to rows 2023-04-03 14:25:42 +02:00
Julian Eisel d43fba6169 Merge branch 'main' into temp-asset-shelf-grid-view 2023-04-03 11:30:48 +02:00
Bastien Montagne 2be8104d8d Merge branch 'main' into asset-shelf 2023-04-01 20:20:35 +02:00
Bastien Montagne f991d52377 Merge branch 'main' into asset-shelf 2023-03-30 18:41:56 +02:00
Julian Eisel 71f9bf4ab7 Merge branch 'asset-shelf' into temp-asset-shelf-grid-view 2023-03-30 15:48:06 +02:00
Julian Eisel 2ee36ddf8e Merge branch 'main' into temp-asset-shelf-grid-view 2023-03-30 15:44:08 +02:00
Julian Eisel 7ecb23962e Switch to asset-shelf add-ons branch on `make update` 2023-03-30 15:34:59 +02:00
Julian Eisel baa3b34bad Merge branch 'main' into asset-shelf 2023-03-30 12:38:04 +02:00
Bastien Montagne 3b06cb74a6 Merge branch 'temp-asset-weak-reference' into asset-shelf 2023-03-29 11:31:54 +02:00
Bastien Montagne e8bd93685b Cleanup.
buildbot/vexp-code-patch-coordinator Build done. Details
2023-03-29 11:04:52 +02:00
Bastien Montagne 098cd86fa4 Merge branch 'main' into temp-asset-weak-reference 2023-03-29 10:38:31 +02:00
Bastien Montagne 3dc872af0e More fixes.
buildbot/vexp-code-patch-coordinator Build done. Details
2023-03-28 20:32:04 +02:00
Bastien Montagne e28d0720ae More tests and debug prints. 2023-03-28 20:19:16 +02:00
Bastien Montagne 7fa63f66c3 Further fixes and debug prints for path & assets nightmare. 2023-03-28 20:12:03 +02:00
Bastien Montagne ba73275532 Further fixes to path handling.
buildbot/vexp-code-patch-coordinator Build done. Details
debug prints are intended for now.
2023-03-28 16:57:03 +02:00
Bastien Montagne e27067d7ac Attempt to fix normilizing ID name part of paths.
buildbot/vexp-code-patch-coordinator Build done. Details
2023-03-28 15:17:56 +02:00
Bastien Montagne de9f3308de Merge branch 'main' into temp-asset-weak-reference 2023-03-28 10:52:23 +02:00
Julian Eisel 39c45ec425 Merge branch 'main' into asset-shelf 2023-03-27 12:19:16 +02:00
Julian Eisel 4710dc0337 Fix test failure on macOS because of short string optimization of moved result
buildbot/vexp-code-patch-coordinator Build done. Details
Since we pass around a struct with a string, and multiple string-references
into this string, we have to make sure the memory address of the string buffer
never changes. It would seem that move semantics give this behavior, but it
wouldn't work for short strings. When moving a string, short string
optimization would still require the string to be copied, not moved, causing a
change in the memory address. GCC and Clang use different definitions of "short
string", causing differences in behavior.

Wrap the string in a unique pointer, so the string itself is never moved or
copied.
2023-03-24 15:10:08 +01:00
Julian Eisel 2a7571fa41 Cleanup: Use more clear `nullopt` return value instead of `{}` 2023-03-24 15:04:03 +01:00
Julian Eisel 4dd7d9380d Merge branch 'main' into temp-asset-weak-reference 2023-03-24 11:46:58 +01:00
Bastien Montagne ce2ef6b9cc Merge branch 'main' into temp-asset-weak-reference
buildbot/vexp-code-patch-coordinator Build done. Details
2023-03-23 17:51:33 +01:00
Julian Eisel 974ebe4864 Merge branch 'main' into temp-asset-weak-reference
buildbot/vexp-code-patch-coordinator Build done. Details
2023-03-23 12:21:52 +01:00
Julian Eisel 873097b0e6 Address points from review 2023-03-23 12:21:18 +01:00
Julian Eisel cb96a82aa6 Fix test failure when test asset path is absolute with ".." components 2023-03-23 12:10:57 +01:00
Bastien Montagne 1dce368d37 Merge branch 'main' into asset-shelf 2023-03-23 11:54:27 +01:00
Julian Eisel 47a1e77a60 Merge branch 'main' into temp-asset-weak-reference 2023-03-23 11:42:11 +01:00
Julian Eisel 9a56b28771 Basic unit tests for the new path resolving and exploding function
buildbot/vexp-code-patch-coordinator Build done. Details
2023-03-22 12:41:08 +01:00
Julian Eisel 693be95b2d Some refactoring for function to resolve to an exploded path
- Use (arguably) more readable return type instead of return arguments.
- Update function API comment.
- Use more clear (because more direct) return values
2023-03-22 12:34:12 +01:00
Bastien Montagne 1d465ff09c Add function to create an exploded path from a weak asset reference 2023-03-22 11:27:04 +01:00
Julian Eisel f8018f7a10 Merge branch 'main' into asset-shelf 2023-03-22 11:14:45 +01:00
Bastien Montagne 203e2a3820 Merge branch 'main' into asset-shelf 2023-03-21 18:50:13 +01:00
Bastien Montagne be1b0deecb Merge branch 'main' into asset-shelf 2023-03-21 17:17:18 +01:00
Bastien Montagne 9e632da128 Free asset shelf types lists in SpaceTypes. 2023-03-21 17:16:38 +01:00
Bastien Montagne 5478ca2589 Merge branch 'main' into asset-shelf 2023-03-21 12:50:45 +01:00
Julian Eisel f768cc2c31 Update to changes in main branch 2023-03-20 12:34:53 +01:00
Julian Eisel 418f76d800 Merge branch 'main' into temp-asset-shelf-grid-view 2023-03-20 12:29:01 +01:00
Julian Eisel af482b91dc Update to changes in main branch 2023-03-20 11:53:49 +01:00
Julian Eisel 2f258e5b02 Merge branch 'main' into asset-shelf 2023-03-20 11:53:43 +01:00
Bastien Montagne 045ef3e214 Merge branch 'main' into asset-shelf 2023-03-16 21:04:15 +01:00
Julian Eisel 84503ebf34 Add functions to resolve a full path to an asset from the weak reference
Includes unit tests.
2023-03-16 18:02:16 +01:00
Julian Eisel 6390c90791 Merge branch 'main' into temp-asset-weak-reference 2023-03-16 16:32:45 +01:00
Julian Eisel 90097c8c77 Merge branch 'main' into asset-shelf 2023-03-16 16:10:34 +01:00
Julian Eisel d1a9dbe2bb Merge branch 'main' into temp-asset-weak-reference 2023-03-16 15:09:44 +01:00
Bastien Montagne e1dd542445 Merge branch 'main' into asset-shelf 2023-03-10 18:11:11 +01:00
Julian Eisel 3e844fb2dc Attempt to fix linker error on GCC
buildbot/vexp-code-patch-coordinator Build done. Details
2023-03-09 16:44:49 +01:00
Julian Eisel 0ab8643dcd Merge branch 'main' into asset-shelf 2023-03-09 16:13:21 +01:00
Julian Eisel 819933cc2e Cleanup: struct member order
buildbot/vexp-code-patch-coordinator Build done. Details
2023-03-09 15:47:56 +01:00
Julian Eisel 7a6f7aa8bc Add test case for custom asset libraries 2023-03-09 15:47:26 +01:00
Julian Eisel a77e194b37 Remove redundant librarary name parameter in more cases 2023-03-09 15:46:48 +01:00
Julian Eisel 04e820cc3f Fix potentially uninitialized values in weak reference 2023-03-09 15:00:57 +01:00
Julian Eisel 8849199940 Merge branch 'main' into temp-asset-weak-reference 2023-03-09 14:51:53 +01:00
Julian Eisel ccbbad8d4b Refactor: Don't pass library name for builtin asset libraries 2023-03-09 14:50:58 +01:00
Julian Eisel 54b6b8660a Fix error in asset weak reference move constructor
I thought the tests passed, what did I doo??..
2023-03-09 12:02:16 +01:00
Julian Eisel dca315eea2 Merge branch 'main' into asset-shelf 2023-03-08 16:56:09 +01:00
Julian Eisel 146141fad3 Merge branch 'main' into temp-asset-weak-reference 2023-03-08 16:53:03 +01:00
Julian Eisel 557da13294 Initial weak asset reference, to store asset references in .blends 2023-03-08 16:51:52 +01:00
Julian Eisel 0b32863368 Merge branch 'main' into temp-asset-shelf-grid-view 2023-03-07 11:33:56 +01:00
Julian Eisel 8a83495f7b Merge branch 'main' into asset-shelf 2023-03-07 11:31:13 +01:00
Julian Eisel 7b81c6e78b Merge branch 'main' into asset-shelf 2023-03-07 11:10:43 +01:00
Julian Eisel ccce92f7a1 Merge branch 'asset-shelf' into temp-asset-shelf-grid-view 2023-03-06 11:45:15 +01:00
Julian Eisel b722292130 Merge branch 'main' into asset-shelf 2023-03-06 11:29:31 +01:00
Julian Eisel cbb0283652 Merge branch 'main' into temp-asset-shelf-grid-view 2023-03-03 16:52:04 +01:00
Julian Eisel 3d1cb8a5ab Merge branch 'main' into asset-shelf 2023-03-03 16:44:10 +01:00
Julian Eisel 00455da966 Fix accidentaly comment out line 2023-03-02 17:29:39 +01:00
Julian Eisel 50292f1018 Use grid-view for the asset shelf
This is the main change needed to properly implement the asset shelf
main region. Loading, displaying, catalog based and type based filtering
work, custom drag & activation operators don't yet. There is no
paginated scrolling or so yet, but scrolling is vertical now (to be
evaulated).
2023-03-02 17:29:00 +01:00
Julian Eisel 9ea9239189 Merge branch 'main' into asset-shelf 2023-03-02 14:46:38 +01:00
Julian Eisel ed60f6c1c3 Update to RNA type registration changes in master 2023-02-28 12:20:05 +01:00
Julian Eisel 88cf5a36cd Merge branch 'main' into asset-shelf 2023-02-28 12:04:00 +01:00
Julian Eisel 62af85aed4 Split asset shelf file into multiple files
Makes code more focused, improving local readability.
2023-02-27 19:36:00 +01:00
Julian Eisel 7d15670a2a Remove duplicated code from merge conflict 2023-02-27 17:03:00 +01:00
Julian Eisel 1667992e14 Merge branch 'main' into asset-shelf 2023-02-27 17:01:23 +01:00
Julian Eisel a0b5fda5af Fix build error 2023-02-27 12:25:40 +01:00
Julian Eisel 19dbb4bfdc Merge branch 'main' into asset-shelf 2023-02-27 11:45:01 +01:00
Julian Eisel 1e31d65986 Cleanup: Minor comment formatting change 2023-02-22 14:27:16 +01:00
Julian Eisel 36326ab736 Merge branch 'temp-asset-shelf-type-bpy' into asset-shelf 2023-02-21 18:49:56 +01:00
Julian Eisel 2cbf647d9c Temporary design to support filtering assets by type
Python defined asset shelfs can now define an `asset_poll__()` function
to determine if an asset should be visible or not, based on type
information. This isn't great and can probably be a performance issue in
bigger libraries. A proper solution would be to provide a set of asset
traits to filter by, but this is a bit tricky to implement. This is a
temporary solution so the brush assets project isn't held up by this.
2023-02-21 18:47:11 +01:00
Julian Eisel 1ede8e033c Merge branch 'main' into temp-asset-shelf-type-bpy 2023-02-21 15:29:55 +01:00
Julian Eisel d6c4ca72dd Merge branch 'main' into temp-asset-shelf-type-bpy 2023-02-21 15:23:13 +01:00
Julian Eisel 3a3b444c8e Fix new essentials asset library not being covered in library path query 2023-02-21 14:50:19 +01:00
Bastien Montagne de27f63ac4 Brush: Add writing and reading ID preview for Brushes.
Mandatory change for the Brush Assets project, from quick test does not
seem to break anything (more) in existing 'old' brushes...

Re. #101908.

Pull Request #105016
2023-02-21 14:50:19 +01:00
Brecht Van Lommel e24ea1483c Fix Cycles MetalRT access of macOS 11 features when unavailable
After recent changes in 2d994de.

Pull Request #104976
2023-02-21 14:50:19 +01:00
Brecht Van Lommel bbf7dacbb0 Gitea: more updates for new scoped label syntax 2023-02-21 14:50:19 +01:00
Brecht Van Lommel 451458bad9 Gitea: update for new scoped label syntax 2023-02-21 14:50:19 +01:00
Falk David b6a2d0cebd Curves: Add cursor snapping support
This adds support for cursor snapping for the new curves object.

It implements a function `transverts_from_curves_positions_create` (to separate the logic from the `Curves` object type). That function is then C wrapped by `ED_curves_transverts_create` and finally used in `ED_transverts_create_from_obedit`.

Pull Request #104967
2023-02-21 14:50:19 +01:00
Falk David 2d8b1455bc Curves: Fix proportional editing not working
This adds proper support for proportional editing for the Curves object.

Co-authored-by: Hans Goudey <h.goudey@me.com>
Pull Request #104620
2023-02-21 14:50:19 +01:00
Sergey Sharybin 7fe04f68a0 Cleanup: Mark overriden virtual call as such
Fixes the `-Winconsistent-missing-override` warning.

In theory the `virtual` is redundant in such case, but this is how
it is done in may other areas of USD code.

Pull Request #104977
2023-02-21 14:50:19 +01:00
Antonio Vazquez 37a2e81747 Fix #104979: GPencil Dot-hash only affects first frame with Time mod
The active frame must be recovered using `BKE_gpencil_frame_retime_get`
2023-02-21 14:50:19 +01:00
Christoph Lendenfeld ffebf8685f Fix: Channel clamping when markers are used
Previously when markers were used, the newly introduced clamping code (#104516) would stop the last channel from being shown.

This patch fixes that by modifying the `v2d->tot.ymin` calculation.

This is a bit counterintuitive since the `v2d->tot` height is calculated in `action_draw.c`. But the advantage of doing it there is that it also works for the channels region.

Pull Request #104892
2023-02-21 14:50:19 +01:00
Jesse Yurkovich 57705d9f98 Tests: Address imbuf_save failures on ARM64 builds
This does 2 things to address the ARM64 failures:
- Increases the threshold to be inline with what Cycles uses
- Disables the 2 problematic WebP variations (#105006 will track)
2023-02-21 14:50:19 +01:00
Chris Blackbourn e21911a0c3 Cleanup: format 2023-02-21 14:50:19 +01:00
Jesse Yurkovich 615958c449 Tests: Add tests for image format saving and loading
This adds saving and loading tests for our supported image formats.

**Saving - bf_imbuf_save.py**
There are 2 template images which are loaded anew for each file save
attempt.  One is an 8-bit RGBA image and the other 32-bit. This is
required as many formats use a variety of factors to determine which of
`ibuf->rect` or `ibuf->rectfloat` to use for processing.  The templates
are constructed to have alpha transparency as well as values > 1 (or
clamped to 1 for the case of the 8-bit template).

Test flow:
 - Load in an appropriate template image
 - Save it to the desired format with the desired set of options
 - Compare against the reference image

Notes:
 - 98 references are used totaling ~3.6MB
 - 10-12 second test runtime
 - Templates can be reconstructed with the create-templates.blend file

**Loading - bf_imbuf_load.py**
Test flow:
 - Load in each of the reference images
 - Save them back out as .exr
 - Save additional metadata to a secondary file (alpha mode, colorspace etc)
 - Compare the saved out .exr with another set of reference .exrs
 - Compare the saved out file metadata with set of reference metadata

Notes:
 - 98 exr references are used totaling ~10MB
 - 10-12 second test runtime as well

A HTML report is not implemented. The diff output organization is very
similar to the other tests so it should be somewhat easy to do in the
future if we want.

The standard set of environment variables are implemented for both:
BLENDER_TEST_UPDATE, BLENDER_VERBOSE, and BLENDER_TEST_COLOR

Pull Request #104442
2023-02-21 14:50:19 +01:00
Joseph Eagar 8f2a9bc116 Sculpt: Implement mesh filter cancel
Added new function sculpt_mesh_filter_cancel in sculpt_filter_mesh.cc
for cancelling mesh filters. It currently is unused pending a
revamped modal map for mesh filter (see pull req 104718).
2023-02-21 14:50:19 +01:00
Joseph Eagar b3a5c8df62 BMesh: fix invalid existence check in BM_mesh_bm_to_me
Remember that the null customdata layer index is -1,
not 0.
2023-02-21 14:50:19 +01:00
Chris Blackbourn 5de924a656 Fix test
Pull Request #104934
2023-02-21 14:50:19 +01:00
Chris Blackbourn eefaa1f8fa BLI_math: fix parameter aliasing in mul_m3_series and mul_m4_series
No functional changes.
2023-02-21 14:50:19 +01:00
Leon Schittek 8ff42046ab Fix #82936: Make Geometry Nodes modifier icon blue in outliner
In the outliner, the icons for modifiers are tinted blue. This didn't
work for the geometry nodes modifier icon.

Defining the icon with the macro `DEF_ICON_MODIFIER` also
defines the appropriate theme color so it's now tinted blue
when drawn in the outliner like the other modifier icons.

Pull Request #104957
2023-02-21 14:50:19 +01:00
Hans Goudey ac17d02993 Nodes: Allow adding multiple search items per type in add menu
Add a per node type callback for creating node add search operations,
similar to the way link drag search is implemented (11be151d58).

Currently the searchable strings have to be separate items in the list.
In a separate step, we can look into adding invisible searchable text
to search items if that's still necessary.

Resolves #102118

Pull Request #104794
2023-02-21 14:50:19 +01:00
Julian Eisel dcb1147eef Basic support for registering asset shelf as a type in BPY
For example, the pose library add-on can now register an asset shelf
like this:

```
class VIEW3D_AST_pose_library(bpy.types.AssetShelf):
    bl_space_type = "VIEW_3D"

    @classmethod
    def poll(cls, context: Context) -> bool:
        return PoseLibraryPanel.poll(context)
```

Filtering by ID type is not supported yet.

This replaces the hack of registering a header type and the asset shelf
template to draw into that.
2023-02-20 20:48:59 +01:00
Julian Eisel 38833c26e4 Cleanup: Minor correction in comment 2023-02-20 17:11:22 +01:00
Julian Eisel 11b871728b Merge branch 'main' into asset-shelf 2023-02-20 17:10:22 +01:00
Julian Eisel 8b9db43ca0 Merge branch 'main' into asset-shelf
buildbot/vexp-code-patch-coordinator Build done. Details
2023-02-16 17:47:28 +01:00
Julian Eisel baf45e1ac8 Show asset name in tooltip, add a small gap before catalog tabs 2023-02-03 15:50:22 +01:00
Julian Eisel 002158c26f Fix asset shelf footer region resizing using wrong coordinates 2023-02-03 15:50:08 +01:00
Julian Eisel 2110b71f1c Allow operators to override asset applying on click through the keymap 2023-02-03 15:41:48 +01:00
Julian Eisel 4b4cf6da9a Merge branch 'master' into asset-shelf 2023-02-02 17:02:10 +01:00
Julian Eisel 56582fbf82 Get filtering by asset catalog to work 2023-02-01 16:26:30 +01:00
Julian Eisel d5c60f912f Tabs to activate a catalog
The tabs should be fully working themselves, however we don't filter
the asset shelf contents based on the active catalog (well, catalog
path) yet.

Includes the changes from D17164.
2023-02-01 12:49:55 +01:00
Julian Eisel 3700b74476 Merge branch 'temp-uibut-non-trivial-construction' into asset-shelf 2023-02-01 11:25:36 +01:00
Julian Eisel c4176781d3 Fix assert failures because of unexpected RNA index default 2023-01-31 17:37:36 +01:00
Julian Eisel 3a34c91448 Cleanup: Remove unnecessary macro & unnecessary cast 2023-01-31 17:32:05 +01:00
Julian Eisel b4edc40fb8 UI: Make uiBut safe for non-trivial construction
Essentially, I wanted to use a non-trivially-constructible C++ type
(`std::function`) inside `uiBut`. But this would mean we can't use
`MEM_cnew()` like allocation anymore.

Rather than writing worse code, allow non-trivial construction for
`uiBut`. Member-initializing all members is annoying since there are so
many, but rather safe than sorry. As we use more C++ types (e.g. convert
callbacks to use `std::function`), this should become less since they
initialize properly on default construction.

Also use proper C++ inheritance for `uiBut` subtypes, the old way to
allocate based on size isn't working anymore.

Differential Revision: https://developer.blender.org/D17164
2023-01-31 17:26:29 +01:00
Julian Eisel db77a9c55e Merge branch 'master' into asset-shelf 2023-01-31 11:24:51 +01:00
Julian Eisel 4fa69fbda8 Popup to select which catalogs are displayed in the asset shelf footer
The selected catalogs are currently listed as simple labels in the
footer, just for testing.
2023-01-19 11:50:45 +01:00
Julian Eisel 47c9c31138 Merge branch 'master' into asset-shelf 2023-01-18 18:32:25 +01:00
Julian Eisel b3ee7ad2cc Extend asset shelf region with a region for the catalogs & options
The new region is empty, except of a dummy button.
2023-01-17 16:24:03 +01:00
Julian Eisel 8ddf492e7c Basic asset shelf prototype
Adds the necessary bits to be able to show an asset shelf template via
the pose library add-on.
2023-01-17 15:18:17 +01:00
Julian Eisel 0e3f5c6673 Merge branch 'master' into asset-shelf 2023-01-17 13:08:57 +01:00
Julian Eisel 9b00338ed4 Merge branch 'master' into asset-shelf 2023-01-16 17:22:56 +01:00
Julian Eisel d6df32a6f8 Add basic (empty) asset shelf region 2022-12-07 20:00:27 +01:00
Julian Eisel 3cd93ace24 Simple progress reporting for all library
Progress bar display the file reading (and other operations) is actually
broken in master for a while, so this won't actually be reported. Still
calculate it for once it's fixed.
2022-12-07 18:29:38 +01:00
Julian Eisel e8575bfd4a General cleanup (comments, remove outdated TODO marks, naming) 2022-12-07 18:20:05 +01:00
Julian Eisel 747a9ea263 Make catalogs from "All" library read-only
Loading the asset library will create a read-only catalog service. The
read-only nature is not dealt with much in the asset catalog code, the
using code (e.g. the UI) is responsible for respecting it.
2022-12-06 17:02:05 +01:00
Julian Eisel af0c1d72a2 Merge branch 'master' into temp-asset-library-all 2022-12-06 11:57:01 +01:00
Julian Eisel 11abc1be39 Use "All" library for node search menu building
Code was manually building the search menu items from all asset
libraries, this is simpler now.
2022-12-02 20:29:12 +01:00
Julian Eisel ecc25bc62e Use "All" library for node add menu building
Code was manually building the add menu from all asset libraries, this
should be simpler now.
2022-12-02 20:23:54 +01:00
Julian Eisel a07a2e2369 Avoid redundant loading of catalogs and "All" library processing 2022-12-02 19:37:43 +01:00
Julian Eisel af5d225653 Load catalogs for "All" asset library
Merges the catalog definitions from all asset libraries in to the
storage of the "All" one, builds the catalog tree and refreshes data as
needed. This doesn't allow writing changes back to the catalog
definition files, so the UI probably shouldn't allow edits.
2022-12-02 19:20:37 +01:00
Julian Eisel 1dc8305213 Merge branch 'master' into temp-asset-library-all 2022-12-02 19:18:18 +01:00
Julian Eisel fb2303fb73 Avoid ugly nested library storage
We actually don't have to do this, since we can just iterate over all
loaded libraries after calling the loading for the "All" asset library.
2022-12-02 16:58:47 +01:00
Julian Eisel 5186c9c9c6 Merge remote-tracking branch 'origin/master' into temp-asset-library-all 2022-12-02 16:20:28 +01:00
Julian Eisel 126136baab Fix missing asset previews and broken drag & drop in "All" library
Together with the changes made in master, all this does is making sure
the assets are loaded and removed using the correct asset library nested
within the "All" library. Now full paths for the assets can be built
correctly from the asset identifier, which fixes preview loading and
drag & drop.
2022-11-30 20:19:30 +01:00
Julian Eisel 3f1e4f6f56 Merge branch 'master' into temp-asset-library-all 2022-11-30 20:02:29 +01:00
Julian Eisel 03bd437170 Merge branch 'master' into temp-asset-library-all 2022-11-30 19:49:29 +01:00
Julian Eisel 2c2515d465 Merge branch 'master' into temp-asset-library-all 2022-11-29 11:14:41 +01:00
Julian Eisel d51212c4f0 Integrate "All" library better with the asset system
Now it actually loads data from all asset libraries when this is
selected. The asset representations still need to be loaded by the file
browser backend, this won't change for now.

This adds the concept of nested asset libraries, which I'd prefer to
keep as implementation detail and not expose in the API. But for now
it's needed (for the asset representation loading by the file browser
backend).
2022-11-28 19:37:00 +01:00
Julian Eisel 86b9b1df22 Merge branch 'master' into temp-asset-library-all 2022-11-28 15:44:59 +01:00
Julian Eisel ca8fa2f7d6 Merge branch 'master' into temp-asset-library-all 2022-11-24 16:25:39 +01:00
Julian Eisel 33bcc4f430 Initial "All" asset library loading support
An "All" asset library can be selected in the Asset Browser and asset
view templates now, and that will load all assets from all asset
libraries. Preview loading, drag & drop and asset catalogs don't work
yet.
2022-11-22 17:59:29 +01:00