respect transparency when setting color per face
This commit is contained in:
@@ -332,9 +332,10 @@ void FaceColors::on_defaultButton_clicked()
|
||||
void FaceColors::on_colorButton_changed()
|
||||
{
|
||||
if (!d->index.isEmpty()) {
|
||||
float alpha = static_cast<float>(d->vp->Transparency.getValue())/100;
|
||||
QColor c = d->ui->colorButton->color();
|
||||
for (QSet<int>::iterator it = d->index.begin(); it != d->index.end(); ++it) {
|
||||
d->perface[*it].set(c.redF(), c.greenF(), c.blueF());
|
||||
d->perface[*it].set(c.redF(), c.greenF(), c.blueF(), alpha);
|
||||
}
|
||||
d->vp->DiffuseColor.setValues(d->perface);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user