Blender Git Commits

Blender Git "asset-browser" branch commits.

Page: 16 / 27

March 1, 2021, 16:11 (GMT)
Merge branch 'master' into ui-asset-view-template
March 1, 2021, 15:45 (GMT)
Initial AssetList API & use it to load assets for the asset view tempate

Lots of hacks and temporary code here. I wanted a first working version to find
possible pain points before getting into details.

Basic idea is to store each asset library in an `AssetList`, with a globally
accessible storage. Internally the list uses the File Browser's `FileList`
which already does a fair amount of heavy lifting (threaded file & external
asset reading, lazy loading of visible previews, ...). The File Browser could
access the global asset-list storage as well.

The asset view template uses the new asset list to load and display the assets.

Current state: {F9856940}

Open TODOs: https://developer.blender.org/maniphest/query/M6RWFxFSDor3/#R
February 23, 2021, 17:50 (GMT)
Add initial asset-view template, with dummy contents (palette colors)

Idea is to be able to display a list of assets in a layout, by giving it
some custom filtering settings (not done yet). This would be just a
uiList managed by Blender, displaying previews similar to the Asset
Browser.
I decided to use uiLists for this because it already deals with stuff
like writing its UI data to .blends (e.g. filtering and sort settings),
filtering and scrolling. But I think we'll have to do a number of
general improvements to them. Here I just added a new (C-only for now)
"flexible grid" list display type, which uses bigger previews and
behaves much better than the currend "grid" one.

There's a bit of hacking going on here and things will probably change.
For now I'm just interested in getting the basics done to see if the
direction is good.
December 10, 2020, 19:27 (GMT)
Merge branch 'temp-review-asset-browser-ui' into asset-browser
December 10, 2020, 19:19 (GMT)
Merge branch 'temp-review-asset-filelists' into temp-review-asset-browser-ui
December 10, 2020, 19:11 (GMT)
Fix crash when splitting area with invisible file browser data
December 10, 2020, 19:10 (GMT)
Merge branch 'temp-review-asset-filelists' into temp-review-asset-browser-ui
December 10, 2020, 18:40 (GMT)
Undo unnecessary int type change
December 10, 2020, 18:39 (GMT)
Undo unnecessary int type change
December 10, 2020, 18:18 (GMT)
Avoid unsafe access to asset browsing through BPY

Python could access asset selection params even though the browser was in file
browsing mode. The value of that data would be undifined then.
December 10, 2020, 17:33 (GMT)
Address review comments
December 10, 2020, 17:23 (GMT)
Don't run thread-unsafe file-list reading in threads
December 10, 2020, 17:07 (GMT)
Fix compile errors after merge
December 10, 2020, 17:05 (GMT)
Merge branch 'temp-review-asset-filelists' into temp-review-asset-browser-ui
December 10, 2020, 17:00 (GMT)
Refactor how we store ID and asset data references in file lists

* Remove ID-map and ID session-UUID code, we can now reference the ID directly.
* Store imported asset metadata separately.
* Because of that, `FILE_TYPE_ASSET_EXTERNAL` could be removed.
* Get asset metadata of the current files via the ID directly.
* Move local data references into a nested struct, to group them together and
allow a clear comment on how they must be updated.
* Improve comments and note how the local data needs to be updated.
December 10, 2020, 16:18 (GMT)
Fix invalid memory use of "Current File" after undo & deleting data-blocks

Implement proper mechanisms to ensure the file list is recreated after undo,
data-blocks are removed, assets created/removed or file loading without UI.
This could be further improved (e.g. don't recreate it if no asset data-block
is affected by undo or deletion).

Addresses T82886 & T83242.
December 10, 2020, 16:12 (GMT)
Fix invalid memory use of "Current File" after undo & deleting data-blocks

Implement proper mechanisms to ensure the file list is recreated after undo,
data-blocks are removed, assets created/removed or file loading without UI.
This could be further improved (e.g. don't recreate it if no asset data-block
is affected by undo or deletion).

Addresses T82886 & T83242.
December 10, 2020, 02:01 (GMT)
Don't allow selecting single .blend's as Asset Libraries for now

Always select a directory - although this could contain a single .blend file of
course. But this will make it easier to add the index/cache in future because
it could just be placed in this directory.
December 10, 2020, 01:53 (GMT)
Finish support for directories as Asset Libraries

I recently found out that the file reading code already supports listing the
data-blocks from all .blends in a directory. All that was left to do was making
sure drag & drop works, which is what this commit fixes.

Addresses T82682.
December 10, 2020, 01:28 (GMT)
Merge branch 'temp-review-asset-browser-ui' into asset-browser
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021