diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-08-25 19:10:01 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-08-25 19:12:35 +0300 |
commit | ad0c2d6cbb99aa70ae30b072ac6724a151debe85 (patch) | |
tree | 1a7ef5e51760ed49ea46eec1451359afd4c999b8 /intern | |
parent | 79af9b1260710f6c8eb680c1f0aea03d7b6b98f5 (diff) |
Fix T45789: Materials with transparency not properly rendered in viewport in Material Render mode
This is a bit tricky one -- ideally viewport should detect whether alpha is used
in the shader tree and if so do separate viewport pass for that objects. But in
practice it's really tricky to detect whether alpha is affected by shader or not
without evaluating the tree for all possible input values. We also can't assume
that alpha might always be affected because it'll slow viewport drawing down.
For until some smart solution is found simply expose alpha blending mode used
by the viewport. It could be found below the Viewport Color settings.
Diffstat (limited to 'intern')
-rw-r--r-- | intern/cycles/blender/addon/ui.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/intern/cycles/blender/addon/ui.py b/intern/cycles/blender/addon/ui.py index c104527e83a..b4a061424b2 100644 --- a/intern/cycles/blender/addon/ui.py +++ b/intern/cycles/blender/addon/ui.py @@ -1164,13 +1164,17 @@ class CyclesMaterial_PT_settings(CyclesButtonsPanel, Panel): col.prop(mat, "alpha") col.separator() - col.prop(mat, "pass_index") + col.label("Viewport Alpha:") + col.prop(mat.game_settings, "alpha_blend", text="") col = split.column(align=True) col.label("Viewport Specular:") col.prop(mat, "specular_color", text="") col.prop(mat, "specular_hardness", text="Hardness") + col.separator() + col.prop(mat, "pass_index") + class CyclesTexture_PT_context(CyclesButtonsPanel, Panel): bl_label = "" |