GPencil: Fix unreported Vertex Opacity Overlay not working
This values was not working because was removed by error in refactor. Reviewed By: mendio, fclem Differential Revision: https://developer.blender.org/D8061
This commit is contained in:
parent
a874cec02b
commit
ffa23b6c77
Notes:
blender-bot
2023-02-14 06:55:40 +01:00
Referenced by issue #77348, Blender LTS: Maintenance Task 2.83
|
@ -6787,7 +6787,10 @@ class VIEW3D_PT_overlay_gpencil_options(Panel):
|
|||
|
||||
if context.object.mode in {'PAINT_GPENCIL', 'VERTEX_GPENCIL'}:
|
||||
layout.label(text="Vertex Paint")
|
||||
layout.prop(overlay, "gpencil_vertex_paint_opacity", text="Opacity", slider=True)
|
||||
row = layout.row()
|
||||
shading = VIEW3D_PT_shading.get_shading(context)
|
||||
row.enabled = shading.type not in {'WIREFRAME', 'RENDERED'}
|
||||
row.prop(overlay, "gpencil_vertex_paint_opacity", text="Opacity", slider=True)
|
||||
|
||||
|
||||
class VIEW3D_PT_quad_view(Panel):
|
||||
|
|
|
@ -265,8 +265,10 @@ GPENCIL_tLayer *gpencil_layer_cache_add(GPENCIL_PrivateData *pd,
|
|||
GPENCIL_VERTEX_MODE(gpd) || pd->is_render;
|
||||
bool is_masked = (gpl->flag & GP_LAYER_USE_MASK) && !BLI_listbase_is_empty(&gpl->mask_layers);
|
||||
|
||||
float vert_col_opacity = (overide_vertcol) ? (is_vert_col_mode ? 1.0f : 0.0f) :
|
||||
gpl->vertex_paint_opacity;
|
||||
float vert_col_opacity = (overide_vertcol) ?
|
||||
(is_vert_col_mode ? pd->vertex_paint_opacity : 0.0f) :
|
||||
pd->is_render ? gpl->vertex_paint_opacity :
|
||||
pd->vertex_paint_opacity;
|
||||
/* Negate thickness sign to tag that strokes are in screen space.
|
||||
* Convert to world units (by default, 1 meter = 2000 px). */
|
||||
float thickness_scale = (is_screenspace) ? -1.0f : (gpd->pixfactor / GPENCIL_PIXEL_FACTOR);
|
||||
|
|
|
@ -224,6 +224,7 @@ void GPENCIL_cache_init(void *ved)
|
|||
const bool is_fade_layer = ((!hide_overlay) && (!pd->is_render) &&
|
||||
(draw_ctx->v3d->gp_flag & V3D_GP_FADE_NOACTIVE_LAYERS));
|
||||
pd->fade_layer_opacity = (is_fade_layer) ? draw_ctx->v3d->overlay.gpencil_fade_layer : -1.0f;
|
||||
pd->vertex_paint_opacity = draw_ctx->v3d->overlay.gpencil_vertex_paint_opacity;
|
||||
/* Fade GPencil Objects. */
|
||||
const bool is_fade_object = ((!hide_overlay) && (!pd->is_render) &&
|
||||
(draw_ctx->v3d->gp_flag & V3D_GP_FADE_OBJECTS) &&
|
||||
|
|
|
@ -363,6 +363,8 @@ typedef struct GPENCIL_PrivateData {
|
|||
float xray_alpha;
|
||||
/* Mask invert uniform. */
|
||||
int mask_invert;
|
||||
/* Vertex Paint opacity. */
|
||||
float vertex_paint_opacity;
|
||||
} GPENCIL_PrivateData;
|
||||
|
||||
/* geometry batch cache functions */
|
||||
|
|
Loading…
Reference in New Issue