diff options
author | IRIE Shinsuke <irieshinsuke@yahoo.co.jp> | 2014-02-11 12:06:21 +0400 |
---|---|---|
committer | IRIE Shinsuke <irieshinsuke@yahoo.co.jp> | 2014-02-11 12:06:21 +0400 |
commit | e2f9afbaabbdecc87c77261e40650da426baf168 (patch) | |
tree | 5cc11b5f91f48177da7b2154416698474e551f6e /source/blender/makesrna/intern | |
parent | 2038eb10d069352cefa83abc6a6c6071807970ae (diff) |
Blender Internal: Modify material property "Cast Buffer Shadows" to affect ray shadows also, and rename it to "Cast Shadows".
This allows us to make materials that don't cast ray shadows.
Turning off this property can reduce the rendering time slightly.
Note: RNA path is changed to "use_cast_shadows" as well. The older
path "use_cast_buffer_shadows" still can be used as its alias, but
it will be removed after updating some addons.
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D272
Diffstat (limited to 'source/blender/makesrna/intern')
-rw-r--r-- | source/blender/makesrna/intern/rna_material.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/source/blender/makesrna/intern/rna_material.c b/source/blender/makesrna/intern/rna_material.c index 807d9fc35e1..76c115c93d6 100644 --- a/source/blender/makesrna/intern/rna_material.c +++ b/source/blender/makesrna/intern/rna_material.c @@ -1937,10 +1937,16 @@ void RNA_def_material(BlenderRNA *brna) "Force this material to render full shading/textures for all anti-aliasing samples"); RNA_def_property_update(prop, 0, "rna_Material_update"); + prop = RNA_def_property(srna, "use_cast_shadows", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_CASTSHADOW); + RNA_def_property_ui_text(prop, "Cast Shadows", + "Allow this material to cast shadows"); + RNA_def_property_update(prop, 0, "rna_Material_update"); + prop = RNA_def_property(srna, "use_cast_buffer_shadows", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_SHADBUF); - RNA_def_property_ui_text(prop, "Cast Buffer Shadows", - "Allow this material to cast shadows from shadow buffer lamps"); + RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_CASTSHADOW); + RNA_def_property_ui_text(prop, "Cast Shadows", + "This is obsolete RNA path, please use 'use_cast_shadows' instead"); RNA_def_property_update(prop, 0, "rna_Material_update"); prop = RNA_def_property(srna, "use_cast_approximate", PROP_BOOLEAN, PROP_NONE); |