Skip to content

Commit

Permalink
[Material] Adjust default material appearance (#12380)
Browse files Browse the repository at this point in the history
  • Loading branch information
maxwxyz committed Feb 18, 2024
1 parent b2c1f1a commit f6f8243
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
14 changes: 7 additions & 7 deletions src/App/Material.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,22 +36,22 @@ using namespace App;
// Material
//===========================================================================
Material::Material()

Check warning on line 38 in src/App/Material.cpp

View workflow job for this annotation

GitHub Actions / Lint / Lint

constructor does not initialize these fields: _matType [cppcoreguidelines-pro-type-member-init]
: shininess{0.2000f}
: shininess{0.9000f}

Check warning on line 39 in src/App/Material.cpp

View workflow job for this annotation

GitHub Actions / Lint / Lint

0.9000f is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers,readability-magic-numbers]

Check warning on line 39 in src/App/Material.cpp

View workflow job for this annotation

GitHub Actions / Lint / Lint

floating point literal has suffix 'f', which is not uppercase [readability-uppercase-literal-suffix]
, transparency{}
{
setType(STEEL);
setType(USER_DEFINED);
}

Material::Material(const char* MatName)

Check warning on line 46 in src/App/Material.cpp

View workflow job for this annotation

GitHub Actions / Lint / Lint

constructor does not initialize these fields: _matType [cppcoreguidelines-pro-type-member-init]
: shininess{0.2000f}
: shininess{0.9000f}

Check warning on line 47 in src/App/Material.cpp

View workflow job for this annotation

GitHub Actions / Lint / Lint

0.9000f is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers,readability-magic-numbers]

Check warning on line 47 in src/App/Material.cpp

View workflow job for this annotation

GitHub Actions / Lint / Lint

floating point literal has suffix 'f', which is not uppercase [readability-uppercase-literal-suffix]
, transparency{}
{
set(MatName);
}

Material::Material(const MaterialType MatType)

Check warning on line 53 in src/App/Material.cpp

View workflow job for this annotation

GitHub Actions / Lint / Lint

constructor does not initialize these fields: _matType [cppcoreguidelines-pro-type-member-init]
: shininess{0.2000f}
: shininess{0.9000f}

Check warning on line 54 in src/App/Material.cpp

View workflow job for this annotation

GitHub Actions / Lint / Lint

0.9000f is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers,readability-magic-numbers]

Check warning on line 54 in src/App/Material.cpp

View workflow job for this annotation

GitHub Actions / Lint / Lint

floating point literal has suffix 'f', which is not uppercase [readability-uppercase-literal-suffix]
, transparency{}
{
setType(MatType);
Expand Down Expand Up @@ -326,11 +326,11 @@ void Material::setType(const MaterialType MatType)
case USER_DEFINED:
break;
default:
ambientColor .set(0.2000f,0.2000f,0.2000f);
diffuseColor .set(0.8000f,0.8000f,0.8000f);
specularColor.set(0.0000f,0.0000f,0.0000f);
ambientColor.set(0.3333f, 0.3333f, 0.3333f);
diffuseColor .set(0.8000f,0.8000f,0.9000f);
specularColor.set(0.5333f, 0.5333f, 0.5333f);
emissiveColor.set(0.0000f,0.0000f,0.0000f);
shininess = 0.2000f;
shininess = 0.9000f;
transparency = 0.0000f;
break;
}
Expand Down
8 changes: 4 additions & 4 deletions src/Mod/Material/Resources/Materials/Appearance/Default.FCMat
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ General:
AppearanceModels:
BasicRendering:
UUID: 'f006c7e4-35b7-43d5-bbf9-c5d572309e6e'
AmbientColor: "(0.2000, 0.2000, 0.2000, 1.0)"
DiffuseColor: "(0.8000, 0.8000, 0.8000, 1.0)"
AmbientColor: "(0.3333, 0.3333, 0.3333, 1.0)"
DiffuseColor: "(0.8000, 0.8000, 0.9000, 1.0)"
EmissiveColor: "(0.0000, 0.0000, 0.0000, 1.0)"
Shininess: "0.2000"
SpecularColor: "(0.0000, 0.0000, 0.0000, 1.0)"
Shininess: "0.9000"
SpecularColor: "(0.5333, 0.5333, 0.5333, 1.0)"
Transparency: "0.0"
2 changes: 1 addition & 1 deletion src/Mod/Part/Gui/DlgSettingsObjectColor.ui
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
<color>
<red>204</red>
<green>204</green>
<blue>204</blue>
<blue>230</blue>
</color>
</property>
<property name="prefEntry" stdset="0">
Expand Down

0 comments on commit f6f8243

Please sign in to comment.