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:
authorClément Foucault <foucault.clem@gmail.com>2018-11-30 15:26:30 +0300
committerClément Foucault <foucault.clem@gmail.com>2018-11-30 17:40:57 +0300
commite68c0bf76a4ccb16f51b7caf488c2f345552eea9 (patch)
treefc5ec8d69b1f33445f2b8aff0639384bcb4ae758 /source/blender/makesrna
parentdabd6615cc0ecbb82f52415e81c734ad041f7598 (diff)
Workbench: Add Shadow Focus and change Shadow Orientation
Shadow focus let the user choose how hard are is the shadows transition. Harder shadow transition can be used for stylistic effects or more uniform shading. Make shadow orientation respect the same orientation as the studio light (view from +Y direction aka. front view). Make the default shadow direction more similar to the default light position (the default light object, not the default studio lighting).
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/intern/rna_scene.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index d6d597aac73..3e3e08459ca 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -5591,7 +5591,6 @@ static void rna_def_scene_display(BlenderRNA *brna)
RNA_def_property_update(prop, NC_SCENE | NA_EDITED, "rna_Scene_set_update");
prop = RNA_def_property(srna, "shadow_shift", PROP_FLOAT, PROP_ANGLE);
- RNA_def_property_float_sdna(prop, NULL, "shadow_shift");
RNA_def_property_float_default(prop, 0.1);
RNA_def_property_ui_text(prop, "Shadow Shift", "Shadow termination angle");
RNA_def_property_range(prop, 0.0f, 1.0f);
@@ -5599,6 +5598,14 @@ static void rna_def_scene_display(BlenderRNA *brna)
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_update(prop, NC_SCENE | NA_EDITED, "rna_Scene_set_update");
+ prop = RNA_def_property(srna, "shadow_focus", PROP_FLOAT, PROP_FACTOR);
+ RNA_def_property_float_default(prop, 0.0);
+ RNA_def_property_ui_text(prop, "Shadow Focus", "Shadow factor hardness");
+ RNA_def_property_range(prop, 0.0f, 1.0f);
+ RNA_def_property_ui_range(prop, 0.0f, 1.0f, 1, 2);
+ RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
+ RNA_def_property_update(prop, NC_SCENE | NA_EDITED, "rna_Scene_set_update");
+
prop = RNA_def_property(srna, "matcap_ssao_distance", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_default(prop, 0.2f);
RNA_def_property_ui_text(prop, "Distance", "Distance of object that contribute to the Cavity/Edge effect");