diff --git a/source/blender/blenkernel/BKE_packedFile.h b/source/blender/blenkernel/BKE_packedFile.h index 63b809a708e..acaf15a8f0a 100644 --- a/source/blender/blenkernel/BKE_packedFile.h +++ b/source/blender/blenkernel/BKE_packedFile.h @@ -103,8 +103,7 @@ int BKE_packedfile_unpack_all_libraries(struct Main *bmain, struct ReportList *r int BKE_packedfile_write_to_file(struct ReportList *reports, const char *ref_file_name, const char *filepath, - struct PackedFile *pf, - bool guimode); + struct PackedFile *pf); /* Free. */ diff --git a/source/blender/blenkernel/intern/packedFile.c b/source/blender/blenkernel/intern/packedFile.c index 2db8ffcf359..f04ad4a767c 100644 --- a/source/blender/blenkernel/intern/packedFile.c +++ b/source/blender/blenkernel/intern/packedFile.c @@ -286,8 +286,7 @@ void BKE_packedfile_pack_all(Main *bmain, ReportList *reports, bool verbose) int BKE_packedfile_write_to_file(ReportList *reports, const char *ref_file_name, const char *filepath_rel, - PackedFile *pf, - const bool guimode) + PackedFile *pf) { int file, number; int ret_value = RET_OK; @@ -296,9 +295,6 @@ int BKE_packedfile_write_to_file(ReportList *reports, char filepath_temp[FILE_MAX]; /* void *data; */ - if (guimode) { - } // XXX waitcursor(1); - STRNCPY(filepath, filepath_rel); BLI_path_abs(filepath, ref_file_name); @@ -350,9 +346,6 @@ int BKE_packedfile_write_to_file(ReportList *reports, } } - if (guimode) { - } // XXX waitcursor(0); - return ret_value; } @@ -441,7 +434,7 @@ char *BKE_packedfile_unpack_to_file(ReportList *reports, ATTR_FALLTHROUGH; } case PF_WRITE_LOCAL: - if (BKE_packedfile_write_to_file(reports, ref_file_name, local_name, pf, 1) == RET_OK) { + if (BKE_packedfile_write_to_file(reports, ref_file_name, local_name, pf) == RET_OK) { temp = local_name; } break; @@ -461,7 +454,7 @@ char *BKE_packedfile_unpack_to_file(ReportList *reports, ATTR_FALLTHROUGH; } case PF_WRITE_ORIGINAL: - if (BKE_packedfile_write_to_file(reports, ref_file_name, abs_name, pf, 1) == RET_OK) { + if (BKE_packedfile_write_to_file(reports, ref_file_name, abs_name, pf) == RET_OK) { temp = abs_name; } break; diff --git a/source/blender/editors/space_info/info_ops.c b/source/blender/editors/space_info/info_ops.c index 5a8efc4bf01..9495d9bef1a 100644 --- a/source/blender/editors/space_info/info_ops.c +++ b/source/blender/editors/space_info/info_ops.c @@ -73,7 +73,9 @@ static int unpack_libraries_exec(bContext *C, wmOperator *op) { Main *bmain = CTX_data_main(C); + WM_cursor_wait(true); BKE_packedfile_unpack_all_libraries(bmain, op->reports); + WM_cursor_wait(false); return OPERATOR_FINISHED; } @@ -225,7 +227,9 @@ static int unpack_all_exec(bContext *C, wmOperator *op) int method = RNA_enum_get(op->ptr, "method"); if (method != PF_KEEP) { + WM_cursor_wait(true); BKE_packedfile_unpack_all(bmain, op->reports, method); /* XXX PF_ASK can't work here */ + WM_cursor_wait(false); } G.fileflags &= ~G_FILE_AUTOPACK; @@ -329,7 +333,9 @@ static int unpack_item_exec(bContext *C, wmOperator *op) } if (method != PF_KEEP) { + WM_cursor_wait(true); BKE_packedfile_id_unpack(bmain, id, op->reports, method); /* XXX PF_ASK can't work here */ + WM_cursor_wait(false); } G.fileflags &= ~G_FILE_AUTOPACK; diff --git a/source/blender/makesrna/intern/rna_image_api.c b/source/blender/makesrna/intern/rna_image_api.c index 207fa35839d..f31cb15967e 100644 --- a/source/blender/makesrna/intern/rna_image_api.c +++ b/source/blender/makesrna/intern/rna_image_api.c @@ -42,8 +42,7 @@ static void rna_ImagePackedFile_save(ImagePackedFile *imapf, Main *bmain, ReportList *reports) { if (BKE_packedfile_write_to_file( - reports, BKE_main_blendfile_path(bmain), imapf->filepath, imapf->packedfile, 0) != - RET_OK) + reports, BKE_main_blendfile_path(bmain), imapf->filepath, imapf->packedfile) != RET_OK) { BKE_reportf(reports, RPT_ERROR, "Could not save packed file to disk as '%s'", imapf->filepath); }