Undo revision 23130 which was a merge with 2.5, a messy one because I did something...
[blender.git] / source / blender / editors / space_image / space_image.c
index c57bc57..1506df8 100644 (file)
@@ -54,7 +54,6 @@
 #include "IMB_imbuf.h"
 #include "IMB_imbuf_types.h"
 
-#include "ED_gpencil.h"
 #include "ED_image.h"
 #include "ED_mesh.h"
 #include "ED_space_api.h"
@@ -295,14 +294,10 @@ static void image_listener(ScrArea *sa, wmNotifier *wmn)
                case NC_IMAGE:  
                        ED_area_tag_redraw(sa);
                        break;
-               case NC_SPACE:  
-                       if(wmn->data == ND_SPACE_IMAGE)
-                               ED_area_tag_redraw(sa);
-                       break;
-               case NC_GEOM:
+               case NC_OBJECT:
                        switch(wmn->data) {
-                               case ND_DATA:
-                               case ND_SELECT:
+                               case ND_GEOM_SELECT:
+                               case ND_GEOM_DATA:
                                        ED_area_tag_redraw(sa);
                                        break;
                        }
@@ -435,22 +430,16 @@ static void image_main_area_draw(const bContext *C, ARegion *ar)
        
        /* we set view2d from own zoom and offset each time */
        image_main_area_set_view2d(sima, ar, scene);
-       
+               
        /* we draw image in pixelspace */
        draw_image_main(sima, ar, scene);
 
        /* and uvs in 0.0-1.0 space */
        UI_view2d_view_ortho(C, v2d);
-               draw_uvedit_main(sima, ar, scene, obedit);
-               ED_region_draw_cb_draw(C, ar, REGION_DRAW_POST);
-               
-               /* Grease Pencil too (in addition to UV's) */
-               draw_image_grease_pencil((bContext *)C, 1); 
+       draw_uvedit_main(sima, ar, scene, obedit);
+       ED_region_draw_cb_draw(C, ar, REGION_DRAW_POST);
        UI_view2d_view_restore(C);
        
-       /* draw Grease Pencil - screen space only */
-       draw_image_grease_pencil((bContext *)C, 0);
-       
        /* scrollers? */
        /*scrollers= UI_view2d_scrollers_calc(C, v2d, V2D_UNIT_VALUES, V2D_GRID_CLAMP, V2D_ARG_DUMMY, V2D_ARG_DUMMY);
        UI_view2d_scrollers_draw(C, v2d, scrollers);
@@ -569,10 +558,11 @@ void ED_spacetype_image(void)
        /* regions: main window */
        art= MEM_callocN(sizeof(ARegionType), "spacetype image region");
        art->regionid = RGN_TYPE_WINDOW;
-       art->keymapflag= ED_KEYMAP_FRAMES|ED_KEYMAP_GPENCIL;
+       art->keymapflag= ED_KEYMAP_FRAMES;
        art->init= image_main_area_init;
        art->draw= image_main_area_draw;
        art->listener= image_main_area_listener;
+       art->keymapflag= 0;
 
        BLI_addhead(&st->regiontypes, art);
        
@@ -629,7 +619,7 @@ void ED_space_image_set(bContext *C, SpaceImage *sima, Scene *scene, Object *obe
 
        if(C) {
                if(obedit)
-                       WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+                       WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit);
 
                ED_area_tag_redraw(CTX_wm_area(C));
        }