Draw grease pencil after masks
authorSergey Sharybin <sergey.vfx@gmail.com>
Mon, 11 Jun 2012 11:54:16 +0000 (11:54 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Mon, 11 Jun 2012 11:54:16 +0000 (11:54 +0000)
Looks like drawing grease pencil before masks was affecting projection matrix
somehow which made masks invisible

Anyway, drawing GP actually shall happen after masks to match how it works
in other areas.

source/blender/editors/space_clip/space_clip.c

index 6409ad6b17146004e8b766bfe21af7f7e2f8a399..534ab8eeb95f11121d647c3bc56bf9eb3ebffc24 100644 (file)
@@ -1101,9 +1101,6 @@ static void clip_main_area_draw(const bContext *C, ARegion *ar)
 
        clip_draw_main(sc, ar, scene);
 
-       /* Grease Pencil */
-       clip_draw_grease_pencil((bContext *)C, 1);
-
        if (sc->mode == SC_MODE_MASKEDIT) {
                int x, y;
                int width, height;
@@ -1147,6 +1144,9 @@ static void clip_main_area_draw(const bContext *C, ARegion *ar)
                glPopMatrix();
        }
 
+       /* Grease Pencil */
+       clip_draw_grease_pencil((bContext *)C, 1);
+
        /* reset view matrix */
        UI_view2d_view_restore(C);