Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJun Mizutani <jmztn>2020-11-13 10:07:07 +0300
committerJeroen Bakker <jeroen@blender.org>2020-11-13 10:14:56 +0300
commitdb7d8281c5a2a56bbc2b7c05ec7160d8819ee191 (patch)
treec92d292c100a1f2dad65c4d4e69296418fb495e1 /source/blender/makesrna/intern
parentf00ebd4dba25f1ddc728a1431a1f81dd03c17457 (diff)
Add An Opacity Slider to Overlay Wireframe
This patch adds an opacity slider to the wireframe overlay. The previous wireframe in dense geometry scenes could be too dark and sometimes the user just wants an impression of the geometry during modelling. Reviewed By: Jeroen Bakker Differential Revision: https://developer.blender.org/D7622
Diffstat (limited to 'source/blender/makesrna/intern')
-rw-r--r--source/blender/makesrna/intern/rna_space.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index 0f4904e5e8f..f63a4ce041f 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -3716,6 +3716,16 @@ static void rna_def_space_view3d_overlay(BlenderRNA *brna)
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
+ prop = RNA_def_property(srna, "wireframe_opacity", PROP_FLOAT, PROP_FACTOR);
+ RNA_def_property_float_sdna(prop, NULL, "overlay.wireframe_opacity");
+ RNA_def_property_ui_text(prop,
+ "Wireframe Opacity",
+ "Opacity of the displayed edges "
+ "(1.0 for opaque)");
+ RNA_def_property_range(prop, 0.0f, 1.0f);
+ RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
+ RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
+
prop = RNA_def_property(srna, "show_paint_wire", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "overlay.paint_flag", V3D_OVERLAY_PAINT_WIRE);
RNA_def_property_ui_text(prop, "Show Wire", "Use wireframe display in painting modes");