code cleanup: rename BKE_tessmesh -> BKE_editmesh, rename EditDerivedBMesh.tc ->...
[blender-staging.git] / source / blender / editors / space_image / space_image.c
index ca8270ba0f57d27b4cbb30142bbdc4fbf1ea2d37..dc2f764d8fdf178795dc71d222904cec13181f0b 100644 (file)
@@ -46,7 +46,7 @@
 #include "BKE_global.h"
 #include "BKE_scene.h"
 #include "BKE_screen.h"
-#include "BKE_tessmesh.h"
+#include "BKE_editmesh.h"
 #include "BKE_sequencer.h"
 #include "BKE_node.h"
 
@@ -253,8 +253,6 @@ static void image_operatortypes(void)
        WM_operatortype_append(IMAGE_OT_sample_line);
        WM_operatortype_append(IMAGE_OT_curves_point_set);
 
-       WM_operatortype_append(IMAGE_OT_record_composite);
-
        WM_operatortype_append(IMAGE_OT_properties);
        WM_operatortype_append(IMAGE_OT_scopes);
 }
@@ -339,7 +337,7 @@ static void image_keymap(struct wmKeyConfig *keyconf)
 }
 
 /* dropboxes */
-static int image_drop_poll(bContext *UNUSED(C), wmDrag *drag, wmEvent *UNUSED(event))
+static int image_drop_poll(bContext *UNUSED(C), wmDrag *drag, const wmEvent *UNUSED(event))
 {
        if (drag->type == WM_DRAG_PATH)
                if (ELEM3(drag->icon, 0, ICON_FILE_IMAGE, ICON_FILE_BLANK)) /* rule might not work? */
@@ -437,6 +435,11 @@ static void image_listener(ScrArea *sa, wmNotifier *wmn)
        
        /* context changes */
        switch (wmn->category) {
+               case NC_WINDOW:
+                       /* notifier comes from editing color space */
+                       image_scopes_tag_refresh(sa);
+                       ED_area_tag_redraw(sa);
+                       break;
                case NC_SCENE:
                        switch (wmn->data) {
                                case ND_FRAME:
@@ -664,6 +667,9 @@ static void image_main_area_draw(const bContext *C, ARegion *ar)
 
        /* and uvs in 0.0-1.0 space */
        UI_view2d_view_ortho(v2d);
+
+       ED_region_draw_cb_draw(C, ar, REGION_DRAW_PRE_VIEW);
+
        draw_uvedit_main(sima, ar, scene, obedit, obact);
 
        /* check for mask (delay draw) */
@@ -803,11 +809,15 @@ static void image_scope_area_draw(const bContext *C, ARegion *ar)
        Scene *scene = CTX_data_scene(C);
        void *lock;
        ImBuf *ibuf = ED_space_image_acquire_buffer(sima, &lock);
+       
        if (ibuf) {
                if (!sima->scopes.ok) {
                        BKE_histogram_update_sample_line(&sima->sample_line_hist, ibuf, &scene->view_settings, &scene->display_settings);
                }
-               scopes_update(&sima->scopes, ibuf, &scene->view_settings, &scene->display_settings);
+               if (sima->image->flag & IMA_VIEW_AS_RENDER)
+                       scopes_update(&sima->scopes, ibuf, &scene->view_settings, &scene->display_settings);
+               else
+                       scopes_update(&sima->scopes, ibuf, NULL, &scene->display_settings);
        }
        ED_space_image_release_buffer(sima, ibuf, lock);