Commit: 34d6c04003775943ecf6a8015a97eb32452c7efb
Author: Antonioya
Date:   Tue Mar 19 10:48:24 2019 +0100
Branches: master
https://developer.blender.org/rB34d6c04003775943ecf6a8015a97eb32452c7efb

Fix T62734: Crash when annotations are rendered from the VSE .view menu.

The render was using the old grease pencil code and not the new annotation code 
for render.

===================================================================

M       source/blender/editors/gpencil/annotate_draw.c
M       source/blender/editors/gpencil/drawgpencil.c
M       source/blender/editors/include/ED_gpencil.h
M       source/blender/editors/render/render_opengl.c

===================================================================

diff --git a/source/blender/editors/gpencil/annotate_draw.c 
b/source/blender/editors/gpencil/annotate_draw.c
index 3d70a7f6843..111a24da528 100644
--- a/source/blender/editors/gpencil/annotate_draw.c
+++ b/source/blender/editors/gpencil/annotate_draw.c
@@ -1133,4 +1133,13 @@ void ED_gpencil_draw_view3d_annotations(
        gp_draw_data_all(scene, gpd, offsx, offsy, winx, winy, CFRA, dflag, 
v3d->spacetype);
 }
 
+void ED_gpencil_draw_ex(
+       Scene *scene, bGPdata *gpd,
+       int winx, int winy, const int cfra, const char spacetype)
+{
+       int dflag = GP_DRAWDATA_NOSTATUS | GP_DRAWDATA_ONLYV2D;
+
+       gp_draw_data_all(scene, gpd, 0, 0, winx, winy, cfra, dflag, spacetype);
+}
+
 /* ************************************************** */
diff --git a/source/blender/editors/gpencil/drawgpencil.c 
b/source/blender/editors/gpencil/drawgpencil.c
index d25ff6b4c07..b9b50ac207d 100644
--- a/source/blender/editors/gpencil/drawgpencil.c
+++ b/source/blender/editors/gpencil/drawgpencil.c
@@ -1751,12 +1751,3 @@ void ED_gpencil_draw_view3d_object(wmWindowManager *wm, 
Scene *scene, Depsgraph
                gp_draw_data(rv3d, brush, 1.0f, ob, gpd, offsx, offsy, winx, 
winy, CFRA, dflag);
        }
 }
-
-void ED_gpencil_draw_ex(
-       ViewLayer *view_layer, RegionView3D *rv3d, Scene *scene,
-       bGPdata *gpd, int winx, int winy, const int cfra, const char spacetype)
-{
-       int dflag = GP_DRAWDATA_NOSTATUS | GP_DRAWDATA_ONLYV2D;
-
-       gp_draw_data_all(view_layer, rv3d, scene, gpd, 0, 0, winx, winy, cfra, 
dflag, spacetype);
-}
diff --git a/source/blender/editors/include/ED_gpencil.h 
b/source/blender/editors/include/ED_gpencil.h
index 5d943930522..12677769527 100644
--- a/source/blender/editors/include/ED_gpencil.h
+++ b/source/blender/editors/include/ED_gpencil.h
@@ -158,7 +158,7 @@ void ED_gpencil_draw_view3d_object(
         struct ARegion *ar,
         bool only3d);
 void ED_gpencil_draw_ex(
-        struct ViewLayer *view_layer, struct RegionView3D *rv3d, struct Scene 
*scene,
+        struct Scene *scene,
         struct bGPdata *gpd, int winx, int winy,
         const int cfra, const char spacetype);
 
diff --git a/source/blender/editors/render/render_opengl.c 
b/source/blender/editors/render/render_opengl.c
index 0e0292c8d71..7fb9dbdf3a6 100644
--- a/source/blender/editors/render/render_opengl.c
+++ b/source/blender/editors/render/render_opengl.c
@@ -265,7 +265,6 @@ static void screen_opengl_views_setup(OGLRender *oglrender)
 static void screen_opengl_render_doit(const bContext *C, OGLRender *oglrender, 
RenderResult *rr)
 {
        Depsgraph *depsgraph = CTX_data_depsgraph(C);
-       ViewLayer *view_layer = CTX_data_view_layer(C);
        Scene *scene = oglrender->scene;
        ARegion *ar = oglrender->ar;
        View3D *v3d = oglrender->v3d;
@@ -327,7 +326,7 @@ static void screen_opengl_render_doit(const bContext *C, 
OGLRender *oglrender, R
 
                        G.f |= G_FLAG_RENDER_VIEWPORT;
                        ED_gpencil_draw_ex(
-                               view_layer, rv3d, scene, gpd, sizex, sizey, 
scene->r.cfra, SPACE_SEQ);
+                               scene, gpd, sizex, sizey, scene->r.cfra, 
SPACE_SEQ);
                        G.f &= ~G_FLAG_RENDER_VIEWPORT;
 
                        gp_rect = MEM_mallocN(sizex * sizey * sizeof(unsigned 
char) * 4, "offscreen rect");

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to