Blender Git Commits

Blender Git "asset-metadata" branch commits.

Page: 2 / 3

Revision a01fcfc by Julian Eisel (asset-browser, asset-metadata)
August 28, 2020, 14:10 (GMT)
Keep assets local to the file, don't copy them

Previously my idea was that when creating an asset for the user
repository, we'd always create a deep copy of the data-block for storage
in the repository.
However for the initial design, we decided to not let Blender
automatically save things into a repository. The user has to mark a
data-block as asset and save the file, so the asset is stored as part of
that file. By adding a path to the Preferences, all .blend files in that
path become part of a repository and users can then access their assets
in different projects through the Asset Browser (not done yet).

Because of this, the operator is now called "Make Asset" again, not
"Create Asset". We don't create a new asset, we just add asset data to
an existing data-block.
August 27, 2020, 17:00 (GMT)
Merge branch 'master' into asset-metadata
August 24, 2020, 18:07 (GMT)
Updates for changes in master

Needed after last merge.
August 24, 2020, 17:10 (GMT)
Merge branch 'master' into asset-metadata
July 16, 2020, 22:50 (GMT)
Merge branch 'master' into asset-metadata
July 10, 2020, 14:57 (GMT)
Add File Browser Link/Append option to show only assets
July 10, 2020, 13:14 (GMT)
Support "Author" metadata field
July 10, 2020, 09:37 (GMT)
Merge branch 'master' into asset-metadata
July 9, 2020, 18:30 (GMT)
Add access to asset-data from ID
July 9, 2020, 18:19 (GMT)
Remove asset data-block again, back to ID.asset_data design

So rather than having an asset data-block to reference data-blocks, let
the data-blocks reference asset-data.

After talking to Brecht, it seems that this approach is just fine. I previously
added the data-block type because I saw some benefits (faster & simpler asset
metadata reading, non-data-block assets, better file-browser integration,
simple remapping of referenced data-blocks), but there are ways to do the same
without the data-block. It's a bit more complicated that way, but still very
doable.
July 8, 2020, 19:41 (GMT)
Add custom tag support to assets

Tags are basically a list of strings. We could optimize these in future if
needed. We could also easily add colors or icons for individual tags (e.g. like
on developer.blender.org).

Note that there's no UI for this yet. Functionality is available via Python
though.
July 8, 2020, 16:42 (GMT)
Support arbitrary descriptions for assets

Simply have a dynamic string in the asset data-block. That can be set and
updated at any point.
July 8, 2020, 14:36 (GMT)
Support preview thumbnails for new asset data-blocks in file browser

Assets have to own a copy of the referenced data-block's preview for this to
work. We *could* do without that, but it complicates partial reading of
data-blocks for the file browser (which may be addressed with further work
though).
July 8, 2020, 10:42 (GMT)
Use new Asset data-block type for "Create Asset" operator

AssetData is unused now. Just keeping it in case it's useful later (to avoid
having to do the monkey work to add it again).
July 8, 2020, 09:01 (GMT)
Merge branch 'master' into asset-metadata
July 6, 2020, 13:41 (GMT)
Add new asset data-block type

With this we can read asset data in .blends more efficiently, e.g. for browsing
files or assets (where we avoid reading more than we have to). But there are
other things besides performance that I'd like to play with.
Basically I see the asset information a bit similar to library information,
which we also deal with as a separate data-block.

The "Create Asset" operator doesn't actually create these data-blocks yet.
That'll be added in a followup commit.

Of course this is not set in stone, but I think a reasonable design to work
with for now.
July 4, 2020, 23:02 (GMT)
Merge branch 'master' into asset-metadata
July 4, 2020, 13:16 (GMT)
Fix crash when changing file after "Create Asset"
July 4, 2020, 13:06 (GMT)
Support object preview thumbnails, generated on asset creation

To generate the preview, a temporary main data-base is created (think of this
as a virtual .blend within the current .blend) with a new scene and the object
to generate the preview for. It's rendered with a camera from the front, using
the "Camera Fit Frame to Selected" logic.
This should be a simple solution requiring no further setup that should work in
most cases. If needed we can have a way to set up the preview differently.

To see it in action:
* In the Outliner context menu for an object run ID Data > Create Asset
* Save the file
* Open a different file (so you can browse into the former)
* Use link/append to navigate into the saved file with the assets. You should
see the preview in thumbnail mode.
July 4, 2020, 13:04 (GMT)
Show info report on successful asset creation

Also set fake-user for new asset data-block so it's not purged when closing the
file.
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021