Materials: Set transparency from DiffuseColor

Migrate the transparency from the DiffuseColor alpha channel to the
transparency color attribute. This allows the alpha channel to be
used as designed

fixes #14938
This commit is contained in:
David Carter
2024-09-21 00:07:00 -04:00
committed by Chris Hennes
parent a47800d9cc
commit 84b0109ad2
3 changed files with 23 additions and 2 deletions

View File

@@ -3018,6 +3018,17 @@ void PropertyMaterialList::setTransparency(int index, float val)
hasSetValue();
}
void PropertyMaterialList::setTransparencies(const std::vector<float>& transparencies)
{
aboutToSetValue();
setSize(transparencies.size(), _lValueList[0]);
for (std::size_t i = 0; i < transparencies.size(); i++) {
_lValueList[i].transparency = transparencies[i];
}
hasSetValue();
}
const Color& PropertyMaterialList::getAmbientColor() const
{
return _lValueList[0].ambientColor;