Fix T86956: VSE shading mode ignores Grease Pencil Vertex colors.
Issue is that due to the strange definition of render in grease pencil (meaning should be rendered similar to rendering). This included normal viewport rendering in OB_RENDER and OpenGL render in OB_RENDER. For other rendering modes the overlay vertex opacity would be used. This patch sets this value to 1 when rendering via a scene strip override. NOTE: that this isn't a good solution as I expect that users want to use the opacity of the Grease pencil object. Perhaps the GPencil team has a better solution for it.
This commit is contained in:
parent
1bdd5becc7
commit
a20ef4207d
Notes:
blender-bot
2023-02-14 02:30:11 +01:00
Referenced by issue #86956, VSE shading mode ignores Grease Pencil Vertex colors
|
@ -297,7 +297,9 @@ typedef struct GPENCIL_PrivateData {
|
|||
int v3d_color_type;
|
||||
/* Current frame */
|
||||
int cfra;
|
||||
/* If we are rendering for final render (F12). */
|
||||
/* If we are rendering for final render (F12).
|
||||
* NOTE: set to false for viewport and opengl rendering (including VSE scene rendering), but set
|
||||
* to true when rendering in `OB_RENDER` shading mode (viewport or opengl rendering) */
|
||||
bool is_render;
|
||||
/* If we are in viewport display (used for VFX). */
|
||||
bool is_viewport;
|
||||
|
|
|
@ -2039,6 +2039,9 @@ ImBuf *ED_view3d_draw_offscreen_imbuf_simple(Depsgraph *depsgraph,
|
|||
v3d.shading.type = drawtype;
|
||||
|
||||
v3d.flag2 = V3D_HIDE_OVERLAYS;
|
||||
/* HACK: When rendering gpencil objects this opacity is used to mix vertex colors in when not in
|
||||
* render mode. */
|
||||
v3d.overlay.gpencil_vertex_paint_opacity = 1.0f;
|
||||
|
||||
if (draw_flags & V3D_OFSDRAW_SHOW_ANNOTATION) {
|
||||
v3d.flag2 |= V3D_SHOW_ANNOTATION;
|
||||
|
|
Loading…
Reference in New Issue