Blender Git Loki

Git Commits -> Revision e413c80

Revision e413c80 by Julian Eisel (master)
December 15, 2020, 16:03 (GMT)
Asset System: Support custom asset library paths through Preferences

One of the core design aspects of the Asset Browser is that users can "mount"
custom asset libraries via the Preferences. Currently an asset library is just
a directory with one or more .blend files in it. We could easily support a
single .blend file as asset library as well (rather than a directory). It's
just disabled currently.

Note that in earlier designs, asset libraries were called repositories.

Idea is simple: In Preferences > File Paths, you can create custom libraries,
by setting a name and selecting a path. The name is ensured to be unique. If
the name or path are empty, the Asset Browser will not show it in the list of
available asset libraries.
The library path is not checked for validity, the Asset Browser will allow
selecting invalid libraries, but show a message instead of the file list, to
help the user understand what's going on.
Of course the actual Asset Browser UI is not part of this commit, it's in one
of the following ones.

{F9497950}

Part of the first Asset Browser milestone. Check the #asset_browser_milestone_1
project milestone on developer.blender.org.

Differential Revision: https://developer.blender.org/D9722

Reviewed by: Brecht Van Lommel, Hans Goudey

Commit Details:

Full Hash: e413c80371c1714d80262034d0e83b4e10e6cbe5
Parent Commit: b5d778a
Lines Changed: +337, -2

2 Added Paths:

/source/blender/blenkernel/BKE_preferences.h (+56, -0) (View)
/source/blender/blenkernel/intern/preferences.c (+119, -0) (View)

13 Modified Paths:

/release/scripts/startup/bl_ui/space_userpref.py (+34, -0) (Diff)
/source/blender/blenkernel/CMakeLists.txt (+2, -0) (Diff)
/source/blender/blenkernel/intern/blender.c (+1, -0) (Diff)
/source/blender/blenkernel/intern/blendfile.c (+3, -0) (Diff)
/source/blender/blenloader/intern/readfile.c (+1, -0) (Diff)
/source/blender/blenloader/intern/versioning_userdef.c (+4, -0) (Diff)
/source/blender/blenloader/intern/writefile.c (+4, -0) (Diff)
/source/blender/editors/interface/interface_handlers.c (+5, -1) (Diff)
/source/blender/editors/space_buttons/buttons_ops.c (+1, -1) (Diff)
/source/blender/editors/space_userpref/userpref_ops.c (+61, -0) (Diff)
/source/blender/makesdna/DNA_userdef_types.h (+9, -0) (Diff)
/source/blender/makesrna/intern/rna_userdef.c (+36, -0) (Diff)
/source/blender/makesrna/RNA_access.h (+1, -0) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021