diff options
Diffstat (limited to 'source/blender/editors/space_image/space_image.c')
-rw-r--r-- | source/blender/editors/space_image/space_image.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/source/blender/editors/space_image/space_image.c b/source/blender/editors/space_image/space_image.c index 9cfd2e645f9..df78dfa4a14 100644 --- a/source/blender/editors/space_image/space_image.c +++ b/source/blender/editors/space_image/space_image.c @@ -33,6 +33,7 @@ #include "DNA_meshdata_types.h" #include "DNA_object_types.h" #include "DNA_scene_types.h" +#include "DNA_image_types.h" #include "MEM_guardedalloc.h" @@ -355,7 +356,7 @@ static void image_keymap(struct wmKeyConfig *keyconf) static int image_drop_poll(bContext *UNUSED(C), wmDrag *drag, const wmEvent *UNUSED(event)) { if (drag->type == WM_DRAG_PATH) - if (ELEM(drag->icon, 0, ICON_FILE_IMAGE, ICON_FILE_BLANK)) /* rule might not work? */ + if (ELEM(drag->icon, 0, ICON_FILE_IMAGE, ICON_FILE_MOVIE, ICON_FILE_BLANK)) /* rule might not work? */ return 1; return 0; } @@ -712,7 +713,7 @@ static void image_main_area_draw(const bContext *C, ARegion *ar) ED_region_draw_cb_draw(C, ar, REGION_DRAW_PRE_VIEW); - draw_uvedit_main(sima, ar, scene, obedit, obact); + ED_uvedit_draw_main(sima, ar, scene, obedit, obact); /* check for mask (delay draw) */ if (ED_space_image_show_uvedit(sima, obedit)) { @@ -772,12 +773,12 @@ static void image_main_area_draw(const bContext *C, ARegion *ar) NULL, C); UI_view2d_view_ortho(v2d); - draw_image_cursor(ar, sima->cursor); + ED_image_draw_cursor(ar, sima->cursor); UI_view2d_view_restore(C); } else if (curve) { UI_view2d_view_ortho(v2d); - draw_image_cursor(ar, sima->cursor); + ED_image_draw_cursor(ar, sima->cursor); UI_view2d_view_restore(C); } @@ -791,7 +792,7 @@ static void image_main_area_draw(const bContext *C, ARegion *ar) #endif } -static void image_main_area_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), ARegion *ar, wmNotifier *wmn) +static void image_main_area_listener(bScreen *UNUSED(sc), ScrArea *sa, ARegion *ar, wmNotifier *wmn) { /* context changes */ switch (wmn->category) { @@ -803,6 +804,14 @@ static void image_main_area_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), A if (wmn->action == NA_PAINTING) ED_region_tag_redraw(ar); break; + case NC_MATERIAL: + if (wmn->data == ND_SHADING_LINKS) { + SpaceImage *sima = sa->spacedata.first; + + if (sima->iuser.scene && (sima->iuser.scene->toolsettings->uv_flag & UV_SHOW_SAME_IMAGE)) + ED_region_tag_redraw(ar); + } + break; } } |