diff options
author | Julian Eisel <julian@blender.org> | 2021-07-21 20:22:44 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2021-07-21 20:35:39 +0300 |
commit | 10e28bd27017664064b1fb93f1ed347d6b404ae6 (patch) | |
tree | 32408fee2bad70af7eeb66f3f189cef8ae7612ee /source/blender/makesdna | |
parent | 8de2b6a02020ad0bc4e4ad7868988a37251e3f88 (diff) |
Assets: Replace duplicated asset library reference type from DNA
Since recently it's possible to access assets from outside the
File/Asset Browser, via the asset view template. So we are slowly
moving away from file space specific code to dedicated asset system
code. I introduced `AssetLibraryReference` as a duplicate of
`FileSelectAssetLibraryUID`, with a plan to delete the latter in a
separate cleanup commit. That's exactly what this commit is.
This will cause Asset Browsers to open with the default "Current File"
Asset Library. We could avoid that, but it's a minor issue really.
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r-- | source/blender/makesdna/DNA_asset_types.h | 1 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_space_types.h | 21 |
2 files changed, 2 insertions, 20 deletions
diff --git a/source/blender/makesdna/DNA_asset_types.h b/source/blender/makesdna/DNA_asset_types.h index 8677ec4a50b..316f8631ece 100644 --- a/source/blender/makesdna/DNA_asset_types.h +++ b/source/blender/makesdna/DNA_asset_types.h @@ -89,7 +89,6 @@ typedef enum eAssetLibraryType { ASSET_LIBRARY_CUSTOM = 100, } eAssetLibraryType; -/* TODO copy of FileSelectAssetLibraryUID */ /** * Information to identify a asset library. May be either one of the predefined types (current * 'Main', builtin library, project library), or a custom type as defined in the Preferences. diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h index b990de29ff3..04c9eab33f1 100644 --- a/source/blender/makesdna/DNA_space_types.h +++ b/source/blender/makesdna/DNA_space_types.h @@ -24,6 +24,7 @@ #pragma once +#include "DNA_asset_types.h" #include "DNA_color_types.h" /* for Histogram */ #include "DNA_defs.h" #include "DNA_image_types.h" /* ImageUser */ @@ -696,24 +697,6 @@ typedef enum eSpaceSeq_OverlayType { /** \name File Selector * \{ */ -/** - * Information to identify a asset library. May be either one of the predefined types (current - * 'Main', builtin library, project library), or a custom type as defined in the Preferences. - * - * If the type is set to #ASSET_LIBRARY_CUSTOM, idname must have the name to identify the - * custom library. Otherwise idname is not used. - */ -typedef struct FileSelectAssetLibraryUID { - short type; /* eFileAssetLibrary_Type */ - char _pad[2]; - /** - * If showing a custom asset library (#ASSET_LIBRARY_CUSTOM), this is the index of the - * #bUserAssetLibrary within #UserDef.asset_libraries. - * Should be ignored otherwise (but better set to -1 then, for sanity and debugging). - */ - int custom_library_index; -} FileSelectAssetLibraryUID; - /* Config and Input for File Selector */ typedef struct FileSelectParams { /** Title, also used for the text of the execute button. */ @@ -785,7 +768,7 @@ typedef struct FileSelectParams { typedef struct FileAssetSelectParams { FileSelectParams base_params; - FileSelectAssetLibraryUID asset_library; + AssetLibraryReference asset_library; short import_type; /* eFileAssetImportType */ char _pad[6]; |