From a3afcae39ed03e0d62087992dac0b64f1a2a3138 Mon Sep 17 00:00:00 2001 From: Antonioya Date: Mon, 1 Oct 2018 16:30:43 +0200 Subject: GP: Add Blur to Shadow FX The shadow needed a blur to make soft transitions and get a better effect. --- source/blender/makesrna/intern/rna_shader_fx.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'source/blender/makesrna/intern/rna_shader_fx.c') 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"); -- cgit v1.2.3