Skip to content

Commit abcaf02

Browse files
authored
Merge pull request #29 from Unity-Technologies/UNI-21301-set-default-color-white
UNI-21301 default export color as white instead of grey
2 parents 220710c + 21342ad commit abcaf02

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Assets/FbxExporters/Editor/FbxExporter.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -243,13 +243,13 @@ public void ExportTexture (Material unityMaterial, string unityPropName,
243243
/// <summary>
244244
/// Get the color of a material, or grey if we can't find it.
245245
/// </summary>
246-
public FbxDouble3 GetMaterialColor (Material unityMaterial, string unityPropName)
246+
public FbxDouble3? GetMaterialColor (Material unityMaterial, string unityPropName, float defaultValue = 1)
247247
{
248248
if (!unityMaterial) {
249-
return new FbxDouble3 (0.5);
249+
return new FbxDouble3(defaultValue);
250250
}
251251
if (!unityMaterial.HasProperty (unityPropName)) {
252-
return new FbxDouble3 (0.5);
252+
return new FbxDouble3(defaultValue);
253253
}
254254
var unityColor = unityMaterial.GetColor (unityPropName);
255255
return new FbxDouble3 (unityColor.r, unityColor.g, unityColor.b);

0 commit comments

Comments
 (0)