diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2018-06-11 17:02:46 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2018-06-11 17:02:46 +0300 |
commit | 204c167c72fe20448200dc0a1504a84762ffd926 (patch) | |
tree | 5f0adb8c5de4f8a0dd6406eabaa65fd36e3ff5ca /source/blender/makesrna | |
parent | 9e439197edcdae1ec9445524bd85bed85249f497 (diff) | |
parent | 78a8d3685bd3487eb0b5dd55793f94fe7235e377 (diff) |
Merge branch 'master' into blender2.8
Conflicts:
source/blender/blenkernel/BKE_mesh.h
source/blender/blenkernel/intern/mesh_convert.c
source/blender/editors/interface/interface_eyedropper_color.c
source/blender/editors/object/object_add.c
source/blender/editors/space_image/image_ops.c
source/blender/makesrna/intern/rna_image.c
source/blender/windowmanager/intern/wm_draw.c
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_color.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_image.c | 22 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_image_api.c | 5 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_main_api.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_material.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_nodetree.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_scene.c | 4 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_sculpt_paint.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_space.c | 2 |
9 files changed, 22 insertions, 21 deletions
diff --git a/source/blender/makesrna/intern/rna_color.c b/source/blender/makesrna/intern/rna_color.c index 67fb58b6208..99fa532452f 100644 --- a/source/blender/makesrna/intern/rna_color.c +++ b/source/blender/makesrna/intern/rna_color.c @@ -557,7 +557,7 @@ static void rna_ColorManagedColorspaceSettings_reload_update(Main *bmain, Scene DEG_id_tag_update(&ima->id, 0); - BKE_image_signal(ima, NULL, IMA_SIGNAL_COLORMANAGE); + BKE_image_signal(bmain, ima, NULL, IMA_SIGNAL_COLORMANAGE); WM_main_add_notifier(NC_IMAGE | ND_DISPLAY, &ima->id); WM_main_add_notifier(NC_IMAGE | NA_EDITED, &ima->id); diff --git a/source/blender/makesrna/intern/rna_image.c b/source/blender/makesrna/intern/rna_image.c index 47e78b8e2a6..cf486ee399f 100644 --- a/source/blender/makesrna/intern/rna_image.c +++ b/source/blender/makesrna/intern/rna_image.c @@ -92,12 +92,12 @@ static void rna_Image_source_set(PointerRNA *ptr, int value) if (value != ima->source) { ima->source = value; - BKE_image_signal(ima, NULL, IMA_SIGNAL_SRC_CHANGE); + BKE_image_signal(G.main, ima, NULL, IMA_SIGNAL_SRC_CHANGE); DEG_id_tag_update(&ima->id, 0); } } -static void rna_Image_fields_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) +static void rna_Image_fields_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr) { Image *ima = ptr->id.data; ImBuf *ibuf; @@ -112,36 +112,36 @@ static void rna_Image_fields_update(Main *UNUSED(bmain), Scene *UNUSED(scene), P if ((ima->flag & IMA_FIELDS) && !(ibuf->flags & IB_fields)) nr = 1; if (nr) - BKE_image_signal(ima, NULL, IMA_SIGNAL_FREE); + BKE_image_signal(bmain, ima, NULL, IMA_SIGNAL_FREE); } BKE_image_release_ibuf(ima, ibuf, lock); } -static void rna_Image_reload_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) +static void rna_Image_reload_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr) { Image *ima = ptr->id.data; - BKE_image_signal(ima, NULL, IMA_SIGNAL_RELOAD); + BKE_image_signal(bmain, ima, NULL, IMA_SIGNAL_RELOAD); WM_main_add_notifier(NC_IMAGE | NA_EDITED, &ima->id); DEG_id_tag_update(&ima->id, 0); } -static void rna_Image_generated_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) +static void rna_Image_generated_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr) { Image *ima = ptr->id.data; - BKE_image_signal(ima, NULL, IMA_SIGNAL_FREE); + BKE_image_signal(bmain, ima, NULL, IMA_SIGNAL_FREE); } -static void rna_Image_colormanage_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) +static void rna_Image_colormanage_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr) { Image *ima = ptr->id.data; - BKE_image_signal(ima, NULL, IMA_SIGNAL_COLORMANAGE); + BKE_image_signal(bmain, ima, NULL, IMA_SIGNAL_COLORMANAGE); DEG_id_tag_update(&ima->id, 0); WM_main_add_notifier(NC_IMAGE | ND_DISPLAY, &ima->id); WM_main_add_notifier(NC_IMAGE | NA_EDITED, &ima->id); } -static void rna_Image_views_format_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *ptr) +static void rna_Image_views_format_update(Main *bmain, Scene *scene, PointerRNA *ptr) { Image *ima = ptr->id.data; ImBuf *ibuf; @@ -152,7 +152,7 @@ static void rna_Image_views_format_update(Main *UNUSED(bmain), Scene *scene, Poi if (ibuf) { ImageUser iuser = {NULL}; iuser.scene = scene; - BKE_image_signal(ima, &iuser, IMA_SIGNAL_FREE); + BKE_image_signal(bmain, ima, &iuser, IMA_SIGNAL_FREE); } BKE_image_release_ibuf(ima, ibuf, lock); diff --git a/source/blender/makesrna/intern/rna_image_api.c b/source/blender/makesrna/intern/rna_image_api.c index 2070ea0a559..39164430140 100644 --- a/source/blender/makesrna/intern/rna_image_api.c +++ b/source/blender/makesrna/intern/rna_image_api.c @@ -189,9 +189,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) @@ -335,6 +335,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"); diff --git a/source/blender/makesrna/intern/rna_main_api.c b/source/blender/makesrna/intern/rna_main_api.c index 9b4d6ead53c..331bf4a580d 100644 --- a/source/blender/makesrna/intern/rna_main_api.c +++ b/source/blender/makesrna/intern/rna_main_api.c @@ -346,7 +346,7 @@ static Image *rna_Main_images_load(Main *bmain, ReportList *reports, const char errno = 0; if (check_existing) { - ima = BKE_image_load_exists(filepath); + ima = BKE_image_load_exists(bmain, filepath); } else { ima = BKE_image_load(bmain, filepath); diff --git a/source/blender/makesrna/intern/rna_material.c b/source/blender/makesrna/intern/rna_material.c index e1eadda3696..858dd0ec972 100644 --- a/source/blender/makesrna/intern/rna_material.c +++ b/source/blender/makesrna/intern/rna_material.c @@ -160,7 +160,7 @@ static void rna_Material_active_paint_texture_index_update(Main *bmain, Scene *s if (sl->spacetype == SPACE_IMAGE) { SpaceImage *sima = (SpaceImage *)sl; if (!sima->pin) { - ED_space_image_set(sima, scene, obedit, image); + ED_space_image_set(bmain, sima, scene, obedit, image); } } } diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index f9e288b348e..3790dffec3b 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -2620,7 +2620,7 @@ static void rna_Node_image_layer_update(Main *bmain, Scene *scene, PointerRNA *p ImageUser *iuser = node->storage; BKE_image_multilayer_index(ima->rr, iuser); - BKE_image_signal(ima, iuser, IMA_SIGNAL_SRC_CHANGE); + BKE_image_signal(bmain, ima, iuser, IMA_SIGNAL_SRC_CHANGE); rna_Node_update(bmain, scene, ptr); diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index af92f25d401..e9f6c4c14b3 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -1981,7 +1981,7 @@ static void rna_GPUDOFSettings_update(Main *UNUSED(bmain), Scene *scene, Pointer WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, scene); } -static void rna_Stereo3dFormat_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) +static void rna_Stereo3dFormat_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr) { ID *id = ptr->id.data; @@ -1996,7 +1996,7 @@ static void rna_Stereo3dFormat_update(Main *UNUSED(bmain), Scene *UNUSED(scene), ibuf = BKE_image_acquire_ibuf(ima, NULL, &lock); if (ibuf) { - BKE_image_signal(ima, NULL, IMA_SIGNAL_FREE); + BKE_image_signal(bmain, ima, NULL, IMA_SIGNAL_FREE); } BKE_image_release_ibuf(ima, ibuf, lock); } diff --git a/source/blender/makesrna/intern/rna_sculpt_paint.c b/source/blender/makesrna/intern/rna_sculpt_paint.c index 1d6d7c49523..be52a3ffca7 100644 --- a/source/blender/makesrna/intern/rna_sculpt_paint.c +++ b/source/blender/makesrna/intern/rna_sculpt_paint.c @@ -412,7 +412,7 @@ static void rna_ImaPaint_canvas_update(bContext *C, PointerRNA *UNUSED(ptr)) SpaceImage *sima = (SpaceImage *)slink; if (!sima->pin) - ED_space_image_set(sima, scene, obedit, ima); + ED_space_image_set(bmain, sima, scene, obedit, ima); } } } diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index f84967d0173..8de651f822d 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -920,7 +920,7 @@ static void rna_SpaceImageEditor_image_set(PointerRNA *ptr, PointerRNA value) Scene *scene = ED_screen_scene_find_with_window(sc, G.main->wm.first, &win); ViewLayer *view_layer = WM_window_get_active_view_layer(win); Object *obedit = OBEDIT_FROM_VIEW_LAYER(view_layer); - ED_space_image_set(sima, scene, obedit, (Image *)value.data); + ED_space_image_set(G.main, sima, scene, obedit, (Image *)value.data); } static void rna_SpaceImageEditor_mask_set(PointerRNA *ptr, PointerRNA value) |