From 78a8d3685bd3487eb0b5dd55793f94fe7235e377 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Mon, 11 Jun 2018 15:40:37 +0200 Subject: Cleanup: remove moar ugly G.main usages... BKE_image was an ugly nest, could fix all but the ones from compositor, so moved ugly G.main there, at least we know where the Evil is that way ;) --- source/blender/makesrna/intern/rna_image_api.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source/blender/makesrna/intern/rna_image_api.c') diff --git a/source/blender/makesrna/intern/rna_image_api.c b/source/blender/makesrna/intern/rna_image_api.c index b50e263e01d..cb8fa6c6c85 100644 --- a/source/blender/makesrna/intern/rna_image_api.c +++ b/source/blender/makesrna/intern/rna_image_api.c @@ -192,9 +192,9 @@ static void rna_Image_unpack(Image *image, Main *bmain, ReportList *reports, int } } -static void rna_Image_reload(Image *image) +static void rna_Image_reload(Image *image, Main *bmain) { - BKE_image_signal(image, NULL, IMA_SIGNAL_RELOAD); + BKE_image_signal(bmain, image, NULL, IMA_SIGNAL_RELOAD); } static void rna_Image_update(Image *image, ReportList *reports) @@ -336,6 +336,7 @@ void RNA_api_image(StructRNA *srna) 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"); + RNA_def_function_flag(func, FUNC_USE_MAIN); RNA_def_function_ui_description(func, "Reload the image from its source path"); func = RNA_def_function(srna, "update", "rna_Image_update"); -- cgit v1.2.3