瀏覽代碼

Downgraded default material settings from warning to log. (#11796)

* Downgraded default material settings from warning to log.
Added material name.

Signed-off-by: AMZN-stankowi <[email protected]>

* added newline to log messages

Signed-off-by: AMZN-stankowi <[email protected]>

Signed-off-by: AMZN-stankowi <[email protected]>
AMZN-stankowi 2 年之前
父節點
當前提交
e57be91182

+ 5 - 5
Code/Tools/SceneAPI/SDKWrapper/AssImpMaterialWrapper.cpp

@@ -56,7 +56,7 @@ namespace AZ
             aiColor3D color(1.f, 1.f, 1.f);
             if (m_assImpMaterial->Get(AI_MATKEY_COLOR_DIFFUSE, color) == aiReturn::aiReturn_FAILURE)
             {
-                AZ_Warning(AZ::SceneAPI::Utilities::WarningWindow, false, "Unable to get diffuse property from the material. Using default.");
+                AZ_TracePrintf(AZ::SceneAPI::Utilities::LogWindow, "Unable to get diffuse property from material %.*s. Using default.\n", AZ_STRING_ARG(GetName()));
             }
             return AZ::Vector3(color.r, color.g, color.b);
         }
@@ -66,7 +66,7 @@ namespace AZ
             aiColor3D color(0.f, 0.f, 0.f);
             if (m_assImpMaterial->Get(AI_MATKEY_COLOR_SPECULAR, color) == aiReturn::aiReturn_FAILURE)
             {
-                AZ_Warning(AZ::SceneAPI::Utilities::WarningWindow, false, "Unable to get specular property from the material. Using default.");
+                AZ_TracePrintf(AZ::SceneAPI::Utilities::LogWindow, "Unable to get specular property from material %.*s. Using default.\n", AZ_STRING_ARG(GetName()));
             }
             return AZ::Vector3(color.r, color.g, color.b);
         }
@@ -76,7 +76,7 @@ namespace AZ
             aiColor3D color(0.f, 0.f, 0.f);
             if (m_assImpMaterial->Get(AI_MATKEY_COLOR_EMISSIVE, color) == aiReturn::aiReturn_FAILURE)
             {
-                AZ_Warning(AZ::SceneAPI::Utilities::WarningWindow, false, "Unable to get emissive property from the material. Using default.");
+                AZ_TracePrintf(AZ::SceneAPI::Utilities::LogWindow, "Unable to get emissive property from material %.*s. Using default.\n", AZ_STRING_ARG(GetName()));
             }
             return AZ::Vector3(color.r, color.g, color.b);
         }
@@ -86,7 +86,7 @@ namespace AZ
             float opacity = 1.0f;
             if (m_assImpMaterial->Get(AI_MATKEY_OPACITY, opacity) == aiReturn::aiReturn_FAILURE)
             {
-                AZ_Warning(AZ::SceneAPI::Utilities::WarningWindow, false, "Unable to get opacity from the material. Using default.");
+                AZ_TracePrintf(AZ::SceneAPI::Utilities::LogWindow, "Unable to get opacity from material %.*s. Using default.\n", AZ_STRING_ARG(GetName()));
             }
             return opacity;
         }
@@ -96,7 +96,7 @@ namespace AZ
             float shininess = 0.0f;
             if (m_assImpMaterial->Get(AI_MATKEY_SHININESS, shininess) == aiReturn::aiReturn_FAILURE)
             {
-                AZ_Warning(AZ::SceneAPI::Utilities::WarningWindow, false, "Unable to get shininess from the material. Using default.");
+                AZ_TracePrintf(AZ::SceneAPI::Utilities::LogWindow, "Unable to get shininess from material %.*s. Using default.\n", AZ_STRING_ARG(GetName()));
             }
             return shininess;
         }

+ 1 - 1
Code/Tools/SceneAPI/SceneBuilder/Importers/AssImpMaterialImporter.cpp

@@ -41,7 +41,7 @@ namespace AZ
                 SerializeContext* serializeContext = azrtti_cast<SerializeContext*>(context);
                 if (serializeContext)
                 {
-                    serializeContext->Class<AssImpMaterialImporter, SceneCore::LoadingComponent>()->Version(1);
+                    serializeContext->Class<AssImpMaterialImporter, SceneCore::LoadingComponent>()->Version(2);
                 }
             }