From ba3ef44a6b57970b278c3a99a7ee00906efa3eb7 Mon Sep 17 00:00:00 2001 From: Alexander Gavrilov Date: Thu, 27 Sep 2018 18:38:07 +0300 Subject: Implement display of weight isoline contours in the fragment shader. Add an option to display contour lines tracing through points with the same interpolated weight value in weight paint mode. This can be useful for working on gentle gradients over a relatively high resolution mesh, where the difference in color between adjacent vertices is very small. The contour grid has 3 levels of detail going down to step 0.001, which automatically fade in or out based on the weight gradient. Fade out works by capping both screen space and weight space line width, and reducing alpha when the screen space width becomes too small for moire and noise-less rendering. Reviewers: fclem Differential Revision: https://developer.blender.org/D3749 --- source/blender/makesdna/DNA_view3d_types.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'source/blender/makesdna/DNA_view3d_types.h') diff --git a/source/blender/makesdna/DNA_view3d_types.h b/source/blender/makesdna/DNA_view3d_types.h index 1b8846df4bc..fca1a79c775 100644 --- a/source/blender/makesdna/DNA_view3d_types.h +++ b/source/blender/makesdna/DNA_view3d_types.h @@ -177,6 +177,10 @@ typedef struct View3DOverlay { /* Paint mode settings */ int paint_flag; + /* Weight paint mode settings */ + int wpaint_flag; + char _pad2[4]; + /* Alpha for texture, weight, vertex paint overlay */ float texture_paint_mode_opacity; float vertex_paint_mode_opacity; @@ -460,6 +464,11 @@ enum { V3D_OVERLAY_PAINT_WIRE = (1 << 0), }; +/* View3DOverlay->wpaint_flag */ +enum { + V3D_OVERLAY_WPAINT_CONTOURS = (1 << 0), +}; + /* View3D->around */ enum { /* center of the bounding box */ -- cgit v1.2.3