diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2014-02-24 18:43:26 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2014-02-24 18:44:22 +0400 |
commit | 7ef1ed15f10c46275486fce1bca0b0355848b32d (patch) | |
tree | 899d7abebaf75a256526d52bbc557da480f1933e /source/blender | |
parent | a3f4736a4d34d9a85ee32a43d2425c7b916a20ec (diff) |
Fix T38766: blender material transparency setting not taken into account for viewport.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/gpu/intern/gpu_draw.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_material.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/gpu/intern/gpu_draw.c b/source/blender/gpu/intern/gpu_draw.c index b9de6721f91..164d0c0b3f5 100644 --- a/source/blender/gpu/intern/gpu_draw.c +++ b/source/blender/gpu/intern/gpu_draw.c @@ -1485,7 +1485,7 @@ void GPU_begin_object_materials(View3D *v3d, RegionView3D *rv3d, Scene *scene, O /* fixed function opengl materials */ gpu_material_to_fixed(&GMS.matbuf[a], ma, gamma, ob, new_shading_nodes); - if (GMS.use_alpha_pass) { + if (GMS.use_alpha_pass && (ma->mode & MA_TRANSP)) { GMS.matbuf[a].diff[3]= ma->alpha; alphablend = (ma->alpha == 1.0f)? GPU_BLEND_SOLID: GPU_BLEND_ALPHA; } diff --git a/source/blender/makesrna/intern/rna_material.c b/source/blender/makesrna/intern/rna_material.c index da343a7143f..44fdfe73015 100644 --- a/source/blender/makesrna/intern/rna_material.c +++ b/source/blender/makesrna/intern/rna_material.c @@ -1750,7 +1750,7 @@ void RNA_def_material(BlenderRNA *brna) prop = RNA_def_property(srna, "use_transparency", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_TRANSP); RNA_def_property_ui_text(prop, "Transparency", "Render material as transparent"); - RNA_def_property_update(prop, 0, "rna_Material_update"); + RNA_def_property_update(prop, 0, "rna_Material_draw_update"); prop = RNA_def_property(srna, "transparency_method", PROP_ENUM, PROP_NONE); RNA_def_property_enum_bitflag_sdna(prop, NULL, "mode"); |