Merge branch 'master' into issue_2390

This commit is contained in:
Matias Lavik
2019-04-03 21:17:38 +02:00
committed by GitHub
2 changed files with 7 additions and 0 deletions

View File

@@ -2046,6 +2046,12 @@ namespace Assimp {
CalculatedOpacity = 1.0f - ((Transparent.r + Transparent.g + Transparent.b) / 3.0f);
}
// try to get the transparency factor
const float TransparencyFactor = PropertyGet<float>(props, "TransparencyFactor", ok);
if (ok) {
out_mat->AddProperty(&TransparencyFactor, 1, AI_MATKEY_TRANSPARENCYFACTOR);
}
// use of TransparencyFactor is inconsistent.
// Maya always stores it as 1.0,
// so we can't use it to set AI_MATKEY_OPACITY.