Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2018-05-31 12:08:02 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2018-05-31 12:08:02 +0300
commit17f458ff320c5c0a0c5cdaeb5da60926d3e03d68 (patch)
treea67031752a7f2011e5cd4ee6b761eb0ad1a274e8 /source/blender/makesrna/intern/rna_image_api.c
parentfcfe1963a622fed257b8b9597424bf11edb19c52 (diff)
parent24d1829243c6e41c639c1d0722a13599a7c1927c (diff)
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/makesrna/intern/rna_image_api.c')
-rw-r--r--source/blender/makesrna/intern/rna_image_api.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/makesrna/intern/rna_image_api.c b/source/blender/makesrna/intern/rna_image_api.c
index 7f0ddf04724..bcac4b7e9a6 100644
--- a/source/blender/makesrna/intern/rna_image_api.c
+++ b/source/blender/makesrna/intern/rna_image_api.c
@@ -61,9 +61,9 @@
#include "MEM_guardedalloc.h"
-static void rna_ImagePackedFile_save(ImagePackedFile *imapf, ReportList *reports)
+static void rna_ImagePackedFile_save(ImagePackedFile *imapf, Main *bmain, ReportList *reports)
{
- if (writePackedFile(reports, imapf->filepath, imapf->packedfile, 0) != RET_OK) {
+ if (writePackedFile(reports, bmain->name, imapf->filepath, imapf->packedfile, 0) != RET_OK) {
BKE_reportf(reports, RPT_ERROR, "Could not save packed file to disk as '%s'",
imapf->filepath);
}
@@ -174,7 +174,7 @@ static void rna_Image_pack(
WM_event_add_notifier(C, NC_IMAGE | NA_EDITED, image);
}
-static void rna_Image_unpack(Image *image, ReportList *reports, int method)
+static void rna_Image_unpack(Image *image, Main *bmain, ReportList *reports, int method)
{
if (!BKE_image_has_packedfile(image)) {
BKE_report(reports, RPT_ERROR, "Image not packed");
@@ -185,7 +185,7 @@ static void rna_Image_unpack(Image *image, ReportList *reports, int method)
}
else {
/* reports its own error on failure */
- unpackImage(reports, image, method);
+ unpackImage(bmain, reports, image, method);
}
}
@@ -301,7 +301,7 @@ void RNA_api_image_packed_file(StructRNA *srna)
func = RNA_def_function(srna, "save", "rna_ImagePackedFile_save");
RNA_def_function_ui_description(func, "Save the packed file to its filepath");
- RNA_def_function_flag(func, FUNC_USE_REPORTS);
+ RNA_def_function_flag(func, FUNC_USE_MAIN | FUNC_USE_REPORTS);
}
void RNA_api_image(StructRNA *srna)
@@ -331,7 +331,7 @@ void RNA_api_image(StructRNA *srna)
func = RNA_def_function(srna, "unpack", "rna_Image_unpack");
RNA_def_function_ui_description(func, "Save an image packed in the .blend file to disk");
- RNA_def_function_flag(func, FUNC_USE_REPORTS);
+ RNA_def_function_flag(func, FUNC_USE_MAIN | FUNC_USE_REPORTS);
RNA_def_enum(func, "method", rna_enum_unpack_method_items, PF_USE_LOCAL, "method", "How to unpack");
func = RNA_def_function(srna, "reload", "rna_Image_reload");