diff options
author | Jeroen Bakker <j.bakker@atmind.nl> | 2018-06-22 11:37:38 +0300 |
---|---|---|
committer | Jeroen Bakker <j.bakker@atmind.nl> | 2018-06-22 11:43:03 +0300 |
commit | f3501a00e249bc4a7212be1f443704066dd43482 (patch) | |
tree | b6c1c39d2a623022ae8f38d5cdb62a61202339b7 /source/blender/makesrna | |
parent | c517778a8bf9a0fc8a60541528cbfaf3ec47c679 (diff) |
PaintMode: Full Shading Boolean => Slider
There was a Full Shading bool that was shared across the WP, VP and TP
modes. This commit makes some changes:
- Replace the bool with a factor. This gives the user more control on
the visibility.
- Also draw it on top of the Material and Rendered mode so the user can
control what he needs. In certain cases you don't want to see the final
rendered material, but the actual texture.
- Removed the skipping of objects when in paint modes. As now the paint
modes are blended.
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_space.c | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index ed1705cf847..80bf6abc368 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -2716,6 +2716,27 @@ static void rna_def_space_view3d_overlay(BlenderRNA *brna) RNA_def_property_boolean_sdna(prop, NULL, "overlay.arm_flag", V3D_OVERLAY_ARM_TRANSP_BONES); RNA_def_property_ui_text(prop, "Transparent Bones", "Display bones as transparent"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); + + prop = RNA_def_property(srna, "texture_paint_mode_opacity", PROP_FLOAT, PROP_FACTOR); + RNA_def_property_float_sdna(prop, NULL, "overlay.texture_paint_mode_opacity"); + RNA_def_property_float_default(prop, 0.8f); + RNA_def_property_ui_text(prop, "Texture Opacity", "Opacity of the texture paint mode overlay"); + RNA_def_property_range(prop, 0.0f, 1.0f); + RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); + + prop = RNA_def_property(srna, "vertex_paint_mode_opacity", PROP_FLOAT, PROP_FACTOR); + RNA_def_property_float_sdna(prop, NULL, "overlay.vertex_paint_mode_opacity"); + RNA_def_property_float_default(prop, 0.8f); + RNA_def_property_ui_text(prop, "Vertex Paint Opacity", "Opacity of the vertex paint mode overlay"); + RNA_def_property_range(prop, 0.0f, 1.0f); + RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); + + prop = RNA_def_property(srna, "weight_paint_mode_opacity", PROP_FLOAT, PROP_FACTOR); + RNA_def_property_float_sdna(prop, NULL, "overlay.weight_paint_mode_opacity"); + RNA_def_property_float_default(prop, 0.8f); + RNA_def_property_ui_text(prop, "Weight Paint Opacity", "Opacity of the weight paint mode overlay"); + RNA_def_property_range(prop, 0.0f, 1.0f); + RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); } static void rna_def_space_view3d(BlenderRNA *brna) @@ -2853,11 +2874,6 @@ static void rna_def_space_view3d(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Textured Solid", "Display face-assigned textures in solid view"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); - prop = RNA_def_property(srna, "show_mode_shade_override", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "flag2", V3D_SHOW_MODE_SHADE_OVERRIDE); - RNA_def_property_ui_text(prop, "Full Shading", "Use full shading for mode drawing (to view final result)"); - RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); - prop = RNA_def_property(srna, "show_occlude_wire", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag2", V3D_OCCLUDE_WIRE); RNA_def_property_ui_text(prop, "Hidden Wire", "Use hidden wireframe display"); |