From e2cefc7dad9f254649ed74d32e1ce9875e21b947 Mon Sep 17 00:00:00 2001 From: Gaia Clary Date: Wed, 20 Feb 2019 20:46:20 +0100 Subject: fix T61122 : Collada exporter exported alpha value (always 0) from deprecated material attribute --- source/blender/collada/EffectExporter.cpp | 4 ++-- source/blender/collada/collada_utils.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'source/blender/collada') diff --git a/source/blender/collada/EffectExporter.cpp b/source/blender/collada/EffectExporter.cpp index e4a35bcfcd6..b6f8ba9ba1f 100644 --- a/source/blender/collada/EffectExporter.cpp +++ b/source/blender/collada/EffectExporter.cpp @@ -98,12 +98,12 @@ void EffectsExporter::set_shader_type(COLLADASW::EffectProfile &ep, Material *ma void EffectsExporter::set_transparency(COLLADASW::EffectProfile &ep, Material *ma) { - if (ma->alpha == 1.0f) { + if (ma->alpha_threshold == 1.0f) { return; // have no transparency } // Tod: because we are in A_ONE mode transparency is calculated like this: - COLLADASW::ColorOrTexture cot = getcol(1.0f, 1.0f, 1.0f, ma->alpha); + COLLADASW::ColorOrTexture cot = getcol(1.0f, 1.0f, 1.0f, ma->alpha_threshold); ep.setTransparent(cot); ep.setOpaque(COLLADASW::EffectProfile::A_ONE); } diff --git a/source/blender/collada/collada_utils.cpp b/source/blender/collada/collada_utils.cpp index 12eeb73b583..d47ab111487 100644 --- a/source/blender/collada/collada_utils.cpp +++ b/source/blender/collada/collada_utils.cpp @@ -1358,7 +1358,7 @@ COLLADASW::ColorOrTexture bc_get_base_color(Material *ma) return bc_get_base_color(master_shader); } else { - return bc_get_cot(ma->r, ma->g, ma->b, ma->alpha); + return bc_get_cot(ma->r, ma->g, ma->b, ma->alpha_threshold); } } -- cgit v1.2.3