Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/collada')
-rw-r--r--source/blender/collada/DocumentImporter.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/collada/DocumentImporter.cpp b/source/blender/collada/DocumentImporter.cpp
index b91039fe012..226f319cefd 100644
--- a/source/blender/collada/DocumentImporter.cpp
+++ b/source/blender/collada/DocumentImporter.cpp
@@ -924,8 +924,12 @@ void DocumentImporter::write_profile_COMMON(COLLADAFW::EffectCommon *ef, Materia
// TRANSPARENT
// color
if (ef->getOpacity().isColor()) {
- float alpha = ef->getOpacity().getColor().getAlpha();
- if (alpha < 1) {
+ col = ef->getTransparent().getColor();
+ float alpha = ef->getTransparency().getFloatValue();
+ if (col.isValid()) {
+ alpha *= col.getAlpha(); // Assuming A_ONE opaque mode
+ }
+ if (col.isValid() || alpha < 1.0) {
ma->alpha = alpha;
ma->mode |= MA_ZTRANSP | MA_TRANSP;
}