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:
authorAntonioya <blendergit@gmail.com>2018-10-01 17:30:43 +0300
committerAntonioya <blendergit@gmail.com>2018-10-01 17:31:04 +0300
commita3afcae39ed03e0d62087992dac0b64f1a2a3138 (patch)
treeefba11cfc72a4da3d181e02071a36fc2236b5ba0 /source/blender/makesrna/intern/rna_shader_fx.c
parentc234c3db1bcb6db868db26b2732775a51972b080 (diff)
GP: Add Blur to Shadow FX
The shadow needed a blur to make soft transitions and get a better effect.
Diffstat (limited to 'source/blender/makesrna/intern/rna_shader_fx.c')
-rw-r--r--source/blender/makesrna/intern/rna_shader_fx.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_shader_fx.c b/source/blender/makesrna/intern/rna_shader_fx.c
index 97acc47f2f4..22ebd3f7567 100644
--- a/source/blender/makesrna/intern/rna_shader_fx.c
+++ b/source/blender/makesrna/intern/rna_shader_fx.c
@@ -458,6 +458,20 @@ static void rna_def_shader_fx_shadow(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Rotation", "Rotation around center or object");
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_ShaderFx_update");
+ prop = RNA_def_property(srna, "blur", PROP_INT, PROP_PIXEL);
+ RNA_def_property_int_sdna(prop, NULL, "blur");
+ RNA_def_property_range(prop, 0, INT_MAX);
+ RNA_def_property_ui_text(prop, "Blur", "Number of pixels for bluring shadow (set to 0 to disable)");
+ RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_ShaderFx_update");
+
+ prop = RNA_def_property(srna, "samples", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "samples");
+ RNA_def_property_range(prop, 0, 32);
+ RNA_def_property_ui_range(prop, 0, 32, 2, -1);
+ RNA_def_property_int_default(prop, 4);
+ RNA_def_property_ui_text(prop, "Samples", "Number of Blur Samples (zero, disable blur)");
+ RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_ShaderFx_update");
+
prop = RNA_def_property(srna, "use_object", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", FX_SHADOW_USE_OBJECT);
RNA_def_property_ui_text(prop, "Use Object", "Use object as center of rotation");