Blender Git Loki
Git Commits -> Revision fe35551
Revision fe35551 by Sybren A. Stüvel (master) March 5, 2021, 14:11 (GMT) |
Asset Browser Space API: add `activate_asset_by_id()` function Add an RNA function `activate_asset_by_id(asset_id: ID, deferred: bool)` to the File Browser space type, which intended to be used to activate an asset's entry as identified by its `ID *`. Calling it changes the active asset, but only if the given ID can actually be found. The activation can be deferred (by passing `deferred=True`) until the next refresh operation has finished. This is necessary when an asset has just been added, as it will be loaded by the filebrowser in a background job. Reviewed By: Severin Differential Revision: https://developer.blender.org/D10549 |
Commit Details:
Full Hash: fe35551df2d874d51073b1dc4a582a1962255949
Parent Commit: 0dd9a4a
Lines Changed: +166, -11
12 Modified Paths:
/source/blender/blenkernel/intern/screen.c (+1, -0) (Diff)
/source/blender/editors/include/ED_fileselect.h (+7, -0) (Diff)
/source/blender/editors/space_file/filelist.c (+6, -5) (Diff)
/source/blender/editors/space_file/filelist.h (+2, -0) (Diff)
/source/blender/editors/space_file/filesel.c (+60, -0) (Diff)
/source/blender/editors/space_file/file_intern.h (+15, -0) (Diff)
/source/blender/editors/space_file/space_file.c (+45, -6) (Diff)
/source/blender/makesdna/DNA_space_types.h (+5, -0) (Diff)
/source/blender/makesrna/intern/rna_internal.h (+1, -0) (Diff)
/source/blender/makesrna/intern/rna_space.c (+2, -0) (Diff)
/source/blender/makesrna/intern/rna_space_api.c (+21, -0) (Diff)
/source/blender/windowmanager/WM_types.h (+1, -0) (Diff)
/source/blender/editors/include/ED_fileselect.h (+7, -0) (Diff)
/source/blender/editors/space_file/filelist.c (+6, -5) (Diff)
/source/blender/editors/space_file/filelist.h (+2, -0) (Diff)
/source/blender/editors/space_file/filesel.c (+60, -0) (Diff)
/source/blender/editors/space_file/file_intern.h (+15, -0) (Diff)
/source/blender/editors/space_file/space_file.c (+45, -6) (Diff)
/source/blender/makesdna/DNA_space_types.h (+5, -0) (Diff)
/source/blender/makesrna/intern/rna_internal.h (+1, -0) (Diff)
/source/blender/makesrna/intern/rna_space.c (+2, -0) (Diff)
/source/blender/makesrna/intern/rna_space_api.c (+21, -0) (Diff)
/source/blender/windowmanager/WM_types.h (+1, -0) (Diff)