[Bf-blender-cvs] [02a8dcc796d] asset-browser: Fix compile errors after merge conflicts
Julian Eisel
noreply at git.blender.org
Wed May 19 18:32:51 CEST 2021
Commit: 02a8dcc796d4658e3d6ea57e512e0bbde3e0fc58
Author: Julian Eisel
Date: Wed May 19 18:32:30 2021 +0200
Branches: asset-browser
https://developer.blender.org/rB02a8dcc796d4658e3d6ea57e512e0bbde3e0fc58
Fix compile errors after merge conflicts
===================================================================
M source/blender/blenkernel/CMakeLists.txt
M source/blender/blenkernel/intern/icons.cc
M source/blender/blenloader/intern/readfile.c
M source/blender/editors/space_file/filelist.c
M source/blender/editors/space_file/space_file.c
M source/blender/makesrna/intern/CMakeLists.txt
===================================================================
diff --git a/source/blender/blenkernel/CMakeLists.txt b/source/blender/blenkernel/CMakeLists.txt
index bdb4feef7db..021d7e15814 100644
--- a/source/blender/blenkernel/CMakeLists.txt
+++ b/source/blender/blenkernel/CMakeLists.txt
@@ -297,7 +297,6 @@ set(SRC
BKE_attribute_access.hh
BKE_attribute_math.hh
BKE_autoexec.h
- BKE_asset.h
BKE_blender.h
BKE_blender_copybuffer.h
BKE_blender_undo.h
diff --git a/source/blender/blenkernel/intern/icons.cc b/source/blender/blenkernel/intern/icons.cc
index 5427288b11c..7e9f81f9c83 100644
--- a/source/blender/blenkernel/intern/icons.cc
+++ b/source/blender/blenkernel/intern/icons.cc
@@ -389,12 +389,6 @@ PreviewImage *BKE_previewimg_id_get(const ID *id)
return prv_p ? *prv_p : nullptr;
}
-PreviewImage *BKE_previewimg_id_get(const ID *id)
-{
- PreviewImage **prv_p = BKE_previewimg_id_get_p(id);
- return prv_p ? *prv_p : NULL;
-}
-
void BKE_previewimg_id_free(ID *id)
{
PreviewImage **prv_p = BKE_previewimg_id_get_p(id);
@@ -458,47 +452,6 @@ void BKE_previewimg_deferred_release(PreviewImage *prv)
}
}
-void BKE_previewimg_id_custom_set(ID *id, const char *path)
-{
- PreviewImage **prv = BKE_previewimg_id_get_p(id);
-
- /* Thumbnail previews must use the deferred pipeline. But we force them to be immediately
- * generated here still. */
-
- if (*prv) {
- BKE_previewimg_deferred_release(*prv);
- }
- *prv = previewimg_deferred_create(path, THB_SOURCE_IMAGE);
-
- /* Can't lazy-render the preview on access. ID previews are saved to files and we want them to be
- * there in time. Not only if something happened to have accessed it meanwhile. */
- for (int i = 0; i < NUM_ICON_SIZES; i++) {
- BKE_previewimg_ensure(*prv, i);
- /* Prevent auto-updates. */
- (*prv)->flag[i] |= PRV_USER_EDITED;
- }
-}
-
-bool BKE_previewimg_id_supports_jobs(const ID *id)
-{
- return ELEM(GS(id->name), ID_OB, ID_MA, ID_TE, ID_LA, ID_WO, ID_IM, ID_BR);
-}
-
-void BKE_previewimg_deferred_release(PreviewImage *prv)
-{
- if (prv) {
- if (prv->tag & PRV_TAG_DEFFERED_RENDERING) {
- /* We cannot delete the preview while it is being loaded in another thread... */
- prv->tag |= PRV_TAG_DEFFERED_DELETE;
- return;
- }
- if (prv->icon_id) {
- BKE_icon_delete(prv->icon_id);
- }
- BKE_previewimg_freefunc(prv);
- }
-}
-
PreviewImage *BKE_previewimg_cached_get(const char *name)
{
BLI_assert(BLI_thread_is_main());
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index f8f8d8e2f8c..fe7d50bfa15 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -999,15 +999,6 @@ AssetMetaData *blo_bhead_id_asset_data_address(const FileData *fd, const BHead *
NULL;
}
-/* Warning! Caller's responsibility to ensure given bhead **is** an ID one! */
-AssetMetaData *blo_bhead_id_asset_data_address(const FileData *fd, const BHead *bhead)
-{
- BLI_assert(BKE_idtype_idcode_is_valid(bhead->code));
- return (fd->id_asset_data_offs >= 0) ?
- *(AssetMetaData **)POINTER_OFFSET(bhead, sizeof(*bhead) + fd->id_asset_data_offs) :
- NULL;
-}
-
static void decode_blender_header(FileData *fd)
{
char header[SIZEOFBLENDERHEADER], num[4];
diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c
index 1e92fe7db90..37a32164cfc 100644
--- a/source/blender/editors/space_file/filelist.c
+++ b/source/blender/editors/space_file/filelist.c
@@ -296,23 +296,6 @@ typedef struct FileListInternEntry {
* Owning pointer. */
AssetMetaData *imported_asset_data;
- /**
- * This is data from the current main, represented by this file. It's crucial that this is
- * updated correctly on undo, redo and file reading (without UI). That's job of the space to do.
- */
- struct {
- /** When showing local IDs (FILE_MAIN, FILE_MAIN_ASSET), the ID this file entry represents. */
- ID *id;
-
- /* For the few file types that have the preview already in memory. For others, there's delayed
- * preview reading from disk. Non-owning pointer. */
- PreviewImage *preview_image;
- } local_data;
-
- /** When the file represents an asset read from another file, it is stored here.
- * Owning pointer. */
- AssetMetaData *imported_asset_data;
-
/** Defined in BLI_fileops.h */
eFileAttributes attributes;
BLI_stat_t st;
diff --git a/source/blender/editors/space_file/space_file.c b/source/blender/editors/space_file/space_file.c
index 5e7da945bfb..12bc0a68ca6 100644
--- a/source/blender/editors/space_file/space_file.c
+++ b/source/blender/editors/space_file/space_file.c
@@ -917,71 +917,6 @@ static void file_id_remap(ScrArea *area, SpaceLink *sl, ID *UNUSED(old_id), ID *
file_reset_filelist_showing_main_data(area, sfile);
}
-static int file_space_subtype_get(ScrArea *area)
-{
- SpaceFile *sfile = area->spacedata.first;
- return sfile->browse_mode;
-}
-
-static void file_space_subtype_set(ScrArea *area, int value)
-{
- SpaceFile *sfile = area->spacedata.first;
- sfile->browse_mode = value;
-}
-
-static void file_space_subtype_item_extend(bContext *UNUSED(C),
- EnumPropertyItem **item,
- int *totitem)
-{
- RNA_enum_items_add(item, totitem, rna_enum_space_file_browse_mode_items);
-}
-
-const char *file_context_dir[] = {"active_file", "active_id", NULL};
-
-static int /*eContextResult*/ file_context(const bContext *C,
- const char *member,
- bContextDataResult *result)
-{
- bScreen *screen = CTX_wm_screen(C);
- SpaceFile *sfile = CTX_wm_space_file(C);
- FileSelectParams *params = ED_fileselect_get_active_params(sfile);
-
- BLI_assert(!ED_area_is_global(CTX_wm_area(C)));
-
- if (CTX_data_dir(member)) {
- CTX_data_dir_set(result, file_context_dir);
- return CTX_RESULT_OK;
- }
- else if (CTX_data_equals(member, "active_file")) {
- FileDirEntry *file = filelist_file(sfile->files, params->active_file);
- CTX_data_pointer_set(result, &screen->id, &RNA_FileSelectEntry, file);
- return CTX_RESULT_OK;
- }
- else if (CTX_data_equals(member, "active_id")) {
- const FileDirEntry *file = filelist_file(sfile->files, params->active_file);
-
- ID *id = filelist_file_get_id(file);
- if (id) {
- CTX_data_id_pointer_set(result, id);
- }
- return CTX_RESULT_OK;
- }
- return CTX_RESULT_MEMBER_NOT_FOUND;
-}
-
-static void file_id_remap(ScrArea *area, SpaceLink *sl, ID *UNUSED(old_id), ID *UNUSED(new_id))
-{
- SpaceFile *sfile = (SpaceFile *)sl;
-
- /* If the file shows main data (IDs), tag it for reset. */
- if (sfile->files && filelist_needs_reset_on_main_changes(sfile->files)) {
- /* Full refresh of the file list if main data was changed, don't even attempt remap pointers.
- * We could give file list types a id-remap callback, but it's probably not worth it.
- * Refreshing local file lists is relatively cheap. */
- file_tag_reset_list(area, sfile);
- }
-}
-
/* only called once, from space/spacetypes.c */
void ED_spacetype_file(void)
{
diff --git a/source/blender/makesrna/intern/CMakeLists.txt b/source/blender/makesrna/intern/CMakeLists.txt
index 31d6e6da2b6..4fafa356879 100644
--- a/source/blender/makesrna/intern/CMakeLists.txt
+++ b/source/blender/makesrna/intern/CMakeLists.txt
@@ -32,7 +32,6 @@ set(DEFSRC
rna_armature.c
rna_asset.c
rna_attribute.c
- rna_asset.c
rna_boid.c
rna_brush.c
rna_cachefile.c
More information about the Bf-blender-cvs
mailing list