From 9f6527790639b2fc073a8f79d24d96127cf7f731 Mon Sep 17 00:00:00 2001 From: Guthrie Adams Date: Wed, 15 Sep 2021 19:17:33 -0500 Subject: [PATCH] restoring changes lost in merge Signed-off-by: Guthrie Adams --- .../Source/Material/MaterialComponentController.cpp | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Material/MaterialComponentController.cpp b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Material/MaterialComponentController.cpp index fab62be530..14f81c5021 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Material/MaterialComponentController.cpp +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Material/MaterialComponentController.cpp @@ -182,16 +182,7 @@ namespace AZ continue; } - if (propertyPair.second.is()) - { - const auto& assetId = *AZStd::any_cast(&propertyPair.second); - Data::Asset imageAsset(assetId, azrtti_typeid()); - materialInstance->SetPropertyValue(materialPropertyIndex, AZ::RPI::MaterialPropertyValue(imageAsset)); - } - else - { - materialInstance->SetPropertyValue(materialPropertyIndex, AZ::RPI::MaterialPropertyValue::FromAny(propertyPair.second)); - } + materialInstance->SetPropertyValue(materialPropertyIndex, AZ::RPI::MaterialPropertyValue::FromAny(propertyPair.second)); } materialInstance->Compile();