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:
authorJeroen Bakker <j.bakker@atmind.nl>2018-05-22 15:12:47 +0300
committerJeroen Bakker <j.bakker@atmind.nl>2018-05-22 15:55:50 +0300
commitdfe088c5d9c819e7266e8e88fb31e92ac2ee8592 (patch)
tree893d823c1957624257c3ef128422c3fa132e9049 /source/blender/makesrna/intern/rna_space.c
parentff19b527e85ec5144efbd663bf9b4c338e179358 (diff)
Workbench: SeeThrough draw option
Option to see through all meshes (transparency) Works for OB_SOLID and OB_TEXTURED. Does not work for V3D_SHADING_SHADOW. TODO: Fresnel effect
Diffstat (limited to 'source/blender/makesrna/intern/rna_space.c')
-rw-r--r--source/blender/makesrna/intern/rna_space.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index 3b9adad4957..d90dbd2ad7a 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -2293,6 +2293,7 @@ static void rna_def_space_view3d_shading(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "shading.single_color");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Color", "Color for single color mode");
+ 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, "show_shadows", PROP_BOOLEAN, PROP_NONE);
@@ -2301,6 +2302,28 @@ static void rna_def_space_view3d_shading(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Shadow", "Show Shadow");
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
+ prop = RNA_def_property(srna, "show_see_through", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "shading.flag", V3D_SHADING_SEE_THROUGH);
+ RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
+ RNA_def_property_ui_text(prop, "See Through", "Show whole scene transparent");
+ RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
+
+ prop = RNA_def_property(srna, "see_through_transparency", PROP_FLOAT, PROP_FACTOR);
+ RNA_def_property_float_sdna(prop, NULL, "shading.see_through_transparency");
+ RNA_def_property_float_default(prop, 0.3f);
+ RNA_def_property_ui_text(prop, "Transparency", "See through transparency");
+ RNA_def_property_range(prop, 0.0f, 1.0f);
+ RNA_def_property_ui_range(prop, 0.1f, 0.5f, 1, 3);
+ RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
+ RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
+
+ prop = RNA_def_property(srna, "object_outline_color", PROP_FLOAT, PROP_COLOR);
+ RNA_def_property_float_sdna(prop, NULL, "shading.object_outline_color");
+ RNA_def_property_array(prop, 3);
+ RNA_def_property_ui_text(prop, "Outline Color", "Color for object outline");
+ 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, "shadow_intensity", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "shading.shadow_intensity");
RNA_def_property_float_default(prop, 0.5);