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:
@@ -339,7 +339,7 @@ App::Material Material::getDefaultAppearance()
|
||||
ParameterGrp::handle hGrp =
|
||||
App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/View");
|
||||
|
||||
auto getColor = [hGrp](const char* parameter, App::Color& color) {
|
||||
auto getColor = [hGrp](const char* parameter, Base::Color& color) {
|
||||
uint32_t packed = color.getPackedRGB();
|
||||
packed = hGrp->GetUnsigned(parameter, packed);
|
||||
color.setPackedRGB(packed);
|
||||
@@ -363,10 +363,10 @@ App::Material Material::getDefaultAppearance()
|
||||
float red = static_cast<float>(intRandom(0, 255)) / 255.0F;
|
||||
float green = static_cast<float>(intRandom(0, 255)) / 255.0F;
|
||||
float blue = static_cast<float>(intRandom(0, 255)) / 255.0F;
|
||||
mat.diffuseColor = App::Color(red, green, blue);
|
||||
mat.diffuseColor = Base::Color(red, green, blue);
|
||||
}
|
||||
else {
|
||||
// Color = (204, 204, 230) = 3435980543UL
|
||||
// Base::Color = (204, 204, 230) = 3435980543UL
|
||||
getColor("DefaultShapeColor", mat.diffuseColor);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user