diff options
author | Alexander Gavrilov <angavrilov@gmail.com> | 2018-09-27 18:38:07 +0300 |
---|---|---|
committer | Alexander Gavrilov <angavrilov@gmail.com> | 2018-10-08 14:15:47 +0300 |
commit | ba3ef44a6b57970b278c3a99a7ee00906efa3eb7 (patch) | |
tree | 654377386ee147e096ebba57725f5949cb32adbe /source/blender/makesrna/intern/rna_space.c | |
parent | d12e7818104d01af2bec39cec430456a32d6b69c (diff) |
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
Diffstat (limited to 'source/blender/makesrna/intern/rna_space.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_space.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index c2224fe767b..92555c54eb4 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -2783,6 +2783,11 @@ static void rna_def_space_view3d_overlay(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Show Wire", "Use wireframe display in painting modes"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); + prop = RNA_def_property(srna, "show_wpaint_contours", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "overlay.wpaint_flag", V3D_OVERLAY_WPAINT_CONTOURS); + RNA_def_property_ui_text(prop, "Show Weight Contours", "Show contour lines formed by points with the same interpolated weight"); + RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); + prop = RNA_def_property(srna, "show_weight", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "overlay.edit_flag", V3D_OVERLAY_EDIT_WEIGHT); RNA_def_property_ui_text(prop, "Show Weights", "Display weights in editmode"); |