diff options
author | IRIE Shinsuke <irieshinsuke@yahoo.co.jp> | 2014-04-23 10:02:06 +0400 |
---|---|---|
committer | IRIE Shinsuke <irieshinsuke@yahoo.co.jp> | 2014-04-23 10:03:34 +0400 |
commit | fc28732ba65a57bccd47940249999809c2c93eb0 (patch) | |
tree | 1ba4dbb7e6644adc029ae36f00e5ac86d27e4b1f /source/blender/makesrna/intern/rna_material.c | |
parent | 0e6b28e04b291dfe797432532208065c52ff3fdb (diff) |
Blender Internal: Add material property "Cast" which can disable both ray and buffer shadows.
Also refactor:
- Material property UI related to shadows
- Preparation of OR-ed mode flags (ma->mode_l) of render materials
Reviewers: brecht
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D313
Diffstat (limited to 'source/blender/makesrna/intern/rna_material.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_material.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_material.c b/source/blender/makesrna/intern/rna_material.c index 44fdfe73015..061f1595c8c 100644 --- a/source/blender/makesrna/intern/rna_material.c +++ b/source/blender/makesrna/intern/rna_material.c @@ -1907,6 +1907,12 @@ void RNA_def_material(BlenderRNA *brna) "Replace the object's base alpha value with alpha from UV map image textures"); 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, "mode2", 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_shadows_only", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_ONLYCAST); RNA_def_property_ui_text(prop, "Cast Shadows Only", |