diff options
-rw-r--r-- | release/scripts/startup/bl_ui/properties_material.py | 6 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/material.c | 2 | ||||
-rw-r--r-- | source/blender/blenloader/intern/versioning_legacy.c | 2 | ||||
-rw-r--r-- | source/blender/editors/render/render_preview.c | 2 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/drawobject.c | 2 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_material_types.h | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_material.c | 12 | ||||
-rw-r--r-- | source/blender/render/intern/raytrace/rayobject.cpp | 2 | ||||
-rw-r--r-- | source/blender/render/intern/source/convertblender.c | 2 | ||||
-rw-r--r-- | source/blender/render/intern/source/shadbuf.c | 4 | ||||
-rw-r--r-- | source/blender/render/intern/source/strand.c | 2 | ||||
-rw-r--r-- | source/blender/render/intern/source/zbuf.c | 6 | ||||
-rw-r--r-- | source/gameengine/Converter/BL_BlenderDataConversion.cpp | 2 |
13 files changed, 20 insertions, 26 deletions
diff --git a/release/scripts/startup/bl_ui/properties_material.py b/release/scripts/startup/bl_ui/properties_material.py index ee3e90591e7..9e56c269b2b 100644 --- a/release/scripts/startup/bl_ui/properties_material.py +++ b/release/scripts/startup/bl_ui/properties_material.py @@ -222,7 +222,7 @@ class MATERIAL_PT_pipeline(MaterialButtonsPanel, Panel): col.prop(mat, "use_cast_shadows_only", text="Cast Only") col.prop(mat, "shadow_cast_alpha", text="Casting Alpha") - col.prop(mat, "use_cast_shadows") + col.prop(mat, "use_cast_buffer_shadows") col.prop(mat, "use_cast_approximate") col.prop(mat, "pass_index") @@ -824,9 +824,9 @@ class MATERIAL_PT_shadow(MaterialButtonsPanel, Panel): col = split.column() if simple_material(base_mat): - col.prop(mat, "use_cast_shadows") + col.prop(mat, "use_cast_buffer_shadows") sub = col.column() - sub.active = mat.use_cast_shadows + sub.active = mat.use_cast_buffer_shadows sub.prop(mat, "shadow_buffer_bias", text="Buffer Bias") col.prop(mat, "use_ray_shadow_bias", text="Auto Ray Bias") sub = col.column() diff --git a/source/blender/blenkernel/intern/material.c b/source/blender/blenkernel/intern/material.c index 40257141ffa..5f6331315f8 100644 --- a/source/blender/blenkernel/intern/material.c +++ b/source/blender/blenkernel/intern/material.c @@ -202,7 +202,7 @@ void init_material(Material *ma) ma->game.alpha_blend = 0; ma->game.face_orientation = 0; - ma->mode = MA_TRACEBLE | MA_CASTSHADOW | MA_SHADOW | MA_RAYBIAS | MA_TANGENT_STR | MA_ZTRANSP; + ma->mode = MA_TRACEBLE | MA_SHADBUF | MA_SHADOW | MA_RAYBIAS | MA_TANGENT_STR | MA_ZTRANSP; ma->shade_flag = MA_APPROX_OCCLUSION; ma->preview = NULL; } diff --git a/source/blender/blenloader/intern/versioning_legacy.c b/source/blender/blenloader/intern/versioning_legacy.c index e82e5b21e7f..0283d9b04fb 100644 --- a/source/blender/blenloader/intern/versioning_legacy.c +++ b/source/blender/blenloader/intern/versioning_legacy.c @@ -2171,7 +2171,7 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *main) ma->mode |= MA_TANGENT_STR; } if (ma->mode & MA_TRACEBLE) - ma->mode |= MA_CASTSHADOW; + ma->mode |= MA_SHADBUF; } } diff --git a/source/blender/editors/render/render_preview.c b/source/blender/editors/render/render_preview.c index aecd4e1aa17..482c855f067 100644 --- a/source/blender/editors/render/render_preview.c +++ b/source/blender/editors/render/render_preview.c @@ -350,7 +350,7 @@ static Scene *preview_prepare_scene(Scene *scene, ID *id, int id_type, ShaderPre if (base->object->id.name[2] == 'c') { Material *shadmat = give_current_material(base->object, base->object->actcol); if (shadmat) { - if (mat->mode & MA_CASTSHADOW) shadmat->septex = 0; + if (mat->mode & MA_SHADBUF) shadmat->septex = 0; else shadmat->septex |= 1; } } diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c index 0a387af7e7e..8a4714eeded 100644 --- a/source/blender/editors/space_view3d/drawobject.c +++ b/source/blender/editors/space_view3d/drawobject.c @@ -3620,7 +3620,7 @@ static bool draw_mesh_object(Scene *scene, ARegion *ar, View3D *v3d, RegionView3 if (v3d->flag2 & V3D_RENDER_SHADOW) { for (i = 0; i < ob->totcol; ++i) { Material *ma = give_current_material(ob, i); - if (ma && !(ma->mode & MA_CASTSHADOW)) { + if (ma && !(ma->mode & MA_SHADBUF)) { return true; } } diff --git a/source/blender/makesdna/DNA_material_types.h b/source/blender/makesdna/DNA_material_types.h index 8dc46ec95d9..a6478f2ae69 100644 --- a/source/blender/makesdna/DNA_material_types.h +++ b/source/blender/makesdna/DNA_material_types.h @@ -267,7 +267,7 @@ typedef struct Material { #define MA_RAYBIAS 0x400000 #define MA_FULL_OSA 0x800000 #define MA_TANGENT_STR 0x1000000 -#define MA_CASTSHADOW 0x2000000 +#define MA_SHADBUF 0x2000000 /* note; we drop MA_TANGENT_STR later to become tangent_u */ #define MA_TANGENT_V 0x4000000 /* qdn: a bit clumsy this, tangents needed for normal maps separated from shading */ diff --git a/source/blender/makesrna/intern/rna_material.c b/source/blender/makesrna/intern/rna_material.c index 76c115c93d6..807d9fc35e1 100644 --- a/source/blender/makesrna/intern/rna_material.c +++ b/source/blender/makesrna/intern/rna_material.c @@ -1937,16 +1937,10 @@ 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_CASTSHADOW); - RNA_def_property_ui_text(prop, "Cast Shadows", - "This is obsolete RNA path, please use 'use_cast_shadows' instead"); + 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_update(prop, 0, "rna_Material_update"); prop = RNA_def_property(srna, "use_cast_approximate", PROP_BOOLEAN, PROP_NONE); diff --git a/source/blender/render/intern/raytrace/rayobject.cpp b/source/blender/render/intern/raytrace/rayobject.cpp index fd3d2b5083b..9e639501fdd 100644 --- a/source/blender/render/intern/raytrace/rayobject.cpp +++ b/source/blender/render/intern/raytrace/rayobject.cpp @@ -118,7 +118,7 @@ MALWAYS_INLINE int vlr_check_intersect(Isect *is, ObjectInstanceRen *obi, VlakRe if (is->mode == RE_RAY_MIRROR) return !(vlr->mat->mode & MA_ONLYCAST); else - return (vlr->mat->mode & MA_CASTSHADOW) && (is->lay & obi->lay); + return (is->lay & obi->lay); } MALWAYS_INLINE int vlr_check_intersect_solid(Isect *UNUSED(is), ObjectInstanceRen *UNUSED(obi), VlakRen *vlr) diff --git a/source/blender/render/intern/source/convertblender.c b/source/blender/render/intern/source/convertblender.c index 56080357dce..bcde98aea8f 100644 --- a/source/blender/render/intern/source/convertblender.c +++ b/source/blender/render/intern/source/convertblender.c @@ -746,7 +746,7 @@ static Material *give_render_material(Render *re, Object *ob, short nr) if (ma->material_type == MA_TYPE_VOLUME) { ma->mode |= MA_TRANSP; - ma->mode &= ~MA_CASTSHADOW; + ma->mode &= ~MA_SHADBUF; } if ((ma->mode & MA_TRANSP) && (ma->mode & MA_ZTRANSP)) re->flag |= R_ZTRA; diff --git a/source/blender/render/intern/source/shadbuf.c b/source/blender/render/intern/source/shadbuf.c index 676e0436bfd..0c3bf85cd24 100644 --- a/source/blender/render/intern/source/shadbuf.c +++ b/source/blender/render/intern/source/shadbuf.c @@ -660,7 +660,7 @@ static void shadowbuf_autoclip(Render *re, LampRen *lar) if (vlr->mat!= ma) { ma= vlr->mat; ok= 1; - if ((ma->mode & MA_CASTSHADOW)==0) ok= 0; + if ((ma->mode & MA_SHADBUF)==0) ok= 0; } if (ok && (obi->lay & lay)) { @@ -2013,7 +2013,7 @@ static void isb_bsp_fillfaces(Render *re, LampRen *lar, ISBBranch *root) if (vlr->mat!= ma) { ma= vlr->mat; ok= 1; - if ((ma->mode & MA_CASTSHADOW)==0) ok= 0; + if ((ma->mode & MA_SHADBUF)==0) ok= 0; if (ma->material_type == MA_TYPE_WIRE) ok= 0; zspanstrand.shad_alpha= zspan.shad_alpha= ma->shad_alpha; } diff --git a/source/blender/render/intern/source/strand.c b/source/blender/render/intern/source/strand.c index 6c13bffdd17..f2d4a7afd94 100644 --- a/source/blender/render/intern/source/strand.c +++ b/source/blender/render/intern/source/strand.c @@ -860,7 +860,7 @@ int zbuffer_strands_abuf(Render *re, RenderPart *pa, APixstrand *apixbuf, ListBa /* test if we should skip it */ ma = obr->strandbuf->ma; - if (shadow && !(ma->mode & MA_CASTSHADOW)) + if (shadow && !(ma->mode & MA_SHADBUF)) continue; else if (!shadow && (ma->mode & MA_ONLYCAST)) continue; diff --git a/source/blender/render/intern/source/zbuf.c b/source/blender/render/intern/source/zbuf.c index 6885768261f..a8ccd1f362f 100644 --- a/source/blender/render/intern/source/zbuf.c +++ b/source/blender/render/intern/source/zbuf.c @@ -2368,7 +2368,7 @@ void zbuffer_shadow(Render *re, float winmat[4][4], LampRen *lar, int *rectz, in if (vlr->mat!= ma) { ma= vlr->mat; ok= 1; - if ((ma->mode & MA_CASTSHADOW)==0) ok= 0; + if ((ma->mode & MA_SHADBUF)==0) ok= 0; } if (ok && (obi->lay & lay) && !(vlr->flag & R_HIDDEN)) { @@ -2421,7 +2421,7 @@ void zbuffer_shadow(Render *re, float winmat[4][4], LampRen *lar, int *rectz, in if (sseg.buffer->ma!= ma) { ma= sseg.buffer->ma; ok= 1; - if ((ma->mode & MA_CASTSHADOW)==0) ok= 0; + if ((ma->mode & MA_SHADBUF)==0) ok= 0; } if (ok && (sseg.buffer->lay & lay)) { @@ -3349,7 +3349,7 @@ static int zbuffer_abuf(Render *re, RenderPart *pa, APixstr *APixbuf, ListBase * if (vlr->mat!=ma) { ma= vlr->mat; if (shadow) - dofill= (ma->mode & MA_CASTSHADOW); + dofill= (ma->mode & MA_SHADBUF); else dofill= (((ma->mode & MA_TRANSP) && (ma->mode & MA_ZTRANSP)) && !(ma->mode & MA_ONLYCAST)); } diff --git a/source/gameengine/Converter/BL_BlenderDataConversion.cpp b/source/gameengine/Converter/BL_BlenderDataConversion.cpp index c823665c3bb..0ec54412485 100644 --- a/source/gameengine/Converter/BL_BlenderDataConversion.cpp +++ b/source/gameengine/Converter/BL_BlenderDataConversion.cpp @@ -610,7 +610,7 @@ static bool ConvertMaterial( material->ras_mode |= ( mat->game.flag & GEMAT_BACKCULL )?0:TWOSIDED; // cast shadows? - material->ras_mode |= ( mat->mode & MA_CASTSHADOW )?CAST_SHADOW:0; + material->ras_mode |= ( mat->mode & MA_SHADBUF )?CAST_SHADOW:0; MTex *mttmp = 0; int valid_index = 0; |