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
4e45d3b408
commit
5bc0684ecd
@@ -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;
|
||||
|
||||
@@ -1156,6 +1156,7 @@ public:
|
||||
|
||||
void setTransparency(float);
|
||||
void setTransparency(int index, float);
|
||||
void setTransparencies(const std::vector<float>& transparencies);
|
||||
|
||||
const Color& getAmbientColor() const;
|
||||
const Color& getAmbientColor(int index) const;
|
||||
|
||||
Reference in New Issue
Block a user