Base: Move App::Color to Base

Every basic data type is stored in Base module, color is standing out as
one that does not. Moving it to Base opens possibilities to integrate it
better with the rest of FreeCAD.
This commit is contained in:
Kacper Donat
2025-02-15 22:58:19 +01:00
parent 145af5cddc
commit a72a63232a
215 changed files with 1057 additions and 1054 deletions

View File

@@ -1007,7 +1007,7 @@ void TopoShape::exportStl(const char *filename, double deflection) const
}
void TopoShape::exportFaceSet(double dev, double ca,
const std::vector<App::Color>& colors,
const std::vector<Base::Color>& colors,
std::ostream& str) const
{
Base::InventorBuilder builder(str);
@@ -1056,7 +1056,7 @@ void TopoShape::exportFaceSet(double dev, double ca,
Base::ShapeHintsItem shapeHints{static_cast<float>(ca)};
builder.addNode(shapeHints);
if (supportFaceColors) {
App::Color c = colors[index];
Base::Color c = colors[index];
Base::MaterialItem material;
material.setDiffuseColor({Base::ColorRGB{c.r, c.g, c.b}});
material.setTransparency({c.a});