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:
committed by
Chris Hennes
parent
a47800d9cc
commit
84b0109ad2
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user