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-06-01 18:06:25 +0300
committerJeroen Bakker <j.bakker@atmind.nl>2018-06-01 18:15:35 +0300
commite4a727626e34eef20e2b41cc3e26b41db4f360a0 (patch)
tree25af9312b02b0defae25f2c08c2a9863d2e795e1 /source/blender/makesrna/intern/rna_space.c
parent56dc2bf0c528524b9a31c9cd27f9b1a261827bf0 (diff)
X-Ray: Added a slider for the alpha
- will not render when set to 0.0 for speed reasons. so when user sets transparency to hide everything the bigger passes will be skipped.
Diffstat (limited to 'source/blender/makesrna/intern/rna_space.c')
-rw-r--r--source/blender/makesrna/intern/rna_space.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index a4b9f077738..b36014370f6 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -2342,6 +2342,15 @@ static void rna_def_space_view3d_shading(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "X-Ray", "Show whole scene transparent");
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
+ prop = RNA_def_property(srna, "xray_alpha", PROP_FLOAT, PROP_FACTOR);
+ RNA_def_property_float_sdna(prop, NULL, "shading.xray_alpha");
+ RNA_def_property_float_default(prop, 0.5);
+ RNA_def_property_ui_text(prop, "X-Ray Alpha", "Amount of alpha to use");
+ RNA_def_property_range(prop, 0.0f, 1.0f);
+ RNA_def_property_ui_range(prop, 0.04f, 1.0f, 1, 1);
+ RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
+ RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
+
prop = RNA_def_property(srna, "use_scene_light", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "shading.flag", V3D_SHADING_SCENE_LIGHT);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);