Design session to work out some technical aspects.
Attendees: Julian Eisel, Sybren Stüvel
Whiteboard Notes
Design Choices
-
Downloading an asset means downloading its blend file and ALL that blend file’s dependencies. Otherwise, when there are multiple assets in that blend file, and we limit the download to only the dependencies of the requested asset, the blend file on disk will still have all the assets in there, but its set of dependencies will be incomplete.
This means an asset can refer to a “file set”, which contains the blend file that the asset contains, and all its dependencies.
-
Should file sets be able to refer to other file sets? For example, a character asset may refer to materials that themselves are also assets. Should this be a reference? Or should files be able to be part of multiple file sets?
-
Should be able to construct the fileset with the current index generator, using
bpy.data.file_path_map()
. -
Should NOT contain
.cats.txt
files; that info is already contained in the remote index file, and thus can be generated locally. -
Asset versioning: add a version number to the schema already. That way a notification about updated versions can be shown, even when Blender doesn’t support versioning yet. Would just overwrite with the latest version.
-
Maximum version of Blender that is compatible (or minimum that is incompatible) should be stored in the asset metadata in the blend file. The index generator can then use that to store in the remote index. The asset browser should pick up on the info in the blend file and hide incompatible assets, regardless of whether it’s showing remote or local assets.
-
Remote asset libraries should be read-only when used in Blender. It should at least not be possible to push assets there (as it wouldn’t really push them to the online repository).
Random Questions
- How to deal with assets that span multiple files? Library
.blend
files, textures in separate files, that kind of thing. How does BlenderKit handle this?
TODOs
- Index generator should check the blend file version, to get the minimum version of Blender for the asset. Right now it just plonks in the version of Blender that generated the index.
(Re)naming
We used the term “index” for too many things, leading to confusion. Here we defined better names now.
- Remote Index → Remote Listing.
- Asset Files:
.blend
files (+ in the future others) containing assets, + their dependencies (library.blend
, textures, etc). One asset may consist of multiple files, and one file may contain multiple assets. - File Set: one or more files that need to be downloaded as a unit. An asset definition refers to its file set, as it contains the asset and its dependencies, and the dependencies of all the other assets in the same blend file. File sets can overlap (like a shared texture).
- Asset Index: Local “asset system cache” with per-blendfile JSON, containing asset metadata. Generated on the fly whenver the blend file changes.
- Download Cache: for stuff that gets downloaded.
Disk/Storage Locations
- HTTP metadata: one file for all of Blender? Or separate per asset library? Choice: per remote asset library.