[Bf-blender-cvs] [ac020278c93] asset-browser: Fix compile errors after merge
Julian Eisel
noreply at git.blender.org
Thu Dec 10 20:30:49 CET 2020
Commit: ac020278c932c976f93bdc7ea9c2ad85122c6c65
Author: Julian Eisel
Date: Thu Dec 10 18:07:27 2020 +0100
Branches: asset-browser
https://developer.blender.org/rBac020278c932c976f93bdc7ea9c2ad85122c6c65
Fix compile errors after merge
===================================================================
M source/blender/editors/space_file/file_draw.c
M source/blender/editors/space_file/file_ops.c
===================================================================
diff --git a/source/blender/editors/space_file/file_draw.c b/source/blender/editors/space_file/file_draw.c
index 54e1dae3930..932301dbf89 100644
--- a/source/blender/editors/space_file/file_draw.c
+++ b/source/blender/editors/space_file/file_draw.c
@@ -135,7 +135,6 @@ static void draw_tile(int sx, int sy, int width, int height, int colorid, int sh
}
static void file_draw_icon(uiBlock *block,
- const struct FileList *files,
const FileDirEntry *file,
const char *rootpath,
const char *path,
@@ -164,7 +163,7 @@ static void file_draw_icon(uiBlock *block,
/* TODO duplicated from file_draw_preview(). */
ID *id;
- if ((id = filelist_file_get_id(files, file))) {
+ if ((id = filelist_file_get_id(file))) {
UI_but_drag_set_id(but, id);
}
else if (file->typeflag & FILE_TYPE_ASSET) {
@@ -288,7 +287,6 @@ void file_calc_previews(const bContext *C, ARegion *region)
}
static void file_draw_preview(uiBlock *block,
- const struct FileList *files,
const FileDirEntry *file,
const char *rootpath,
const char *path,
@@ -467,7 +465,7 @@ static void file_draw_preview(uiBlock *block,
if (drag) {
ID *id;
- if ((id = filelist_file_get_id(files, file))) {
+ if ((id = filelist_file_get_id(file))) {
UI_but_drag_set_id(but, id);
}
/* path is no more static, cannot give it directly to but... */
@@ -913,7 +911,6 @@ void file_draw_list(const bContext *C, ARegion *region)
}
file_draw_preview(block,
- files,
file,
root,
path,
@@ -930,7 +927,6 @@ void file_draw_list(const bContext *C, ARegion *region)
}
else {
file_draw_icon(block,
- files,
file,
root,
path,
diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c
index a4b6bbd8964..be4577bcba7 100644
--- a/source/blender/editors/space_file/file_ops.c
+++ b/source/blender/editors/space_file/file_ops.c
@@ -2697,12 +2697,11 @@ static bool file_delete_poll(bContext *C)
}
static bool file_delete_single(const FileSelectParams *params,
- const struct FileList *filelist,
FileDirEntry *file,
const char **r_error_message)
{
if (file->typeflag & FILE_TYPE_ASSET) {
- ID *id = filelist_file_get_id(filelist, file);
+ ID *id = filelist_file_get_id(file);
if (!id) {
*r_error_message = "File is not a local data-block asset.";
return false;
@@ -2733,7 +2732,7 @@ static int file_delete_exec(bContext *C, wmOperator *op)
for (int i = 0; i < numfiles; i++) {
if (filelist_entry_select_index_get(sfile->files, i, CHECK_ALL)) {
FileDirEntry *file = filelist_file(sfile->files, i);
- if (!file_delete_single(params, sfile->files, file, &error_message)) {
+ if (!file_delete_single(params, file, &error_message)) {
report_error = true;
}
}
More information about the Bf-blender-cvs
mailing list