Merge branch 'development' into Atom/guthadam/material_component_supports_property_overrides_without_material_overrides
Signed-off-by: Guthrie Adams <guthadam@amazon.com> # Conflicts: # Gems/AtomLyIntegration/CommonFeatures/Code/Source/Material/MaterialComponentController.cpp
This commit is contained in:
+5
-4
@@ -9,6 +9,7 @@
|
||||
#include <Material/MaterialComponentController.h>
|
||||
#include <Atom/RPI.Reflect/Material/MaterialAsset.h>
|
||||
#include <Atom/RPI.Reflect/Asset/AssetUtils.h>
|
||||
#include <AzCore/Asset/AssetSerializer.h>
|
||||
#include <AzCore/Serialization/SerializeContext.h>
|
||||
#include <AtomCore/Instance/InstanceDatabase.h>
|
||||
|
||||
@@ -144,7 +145,7 @@ namespace AZ
|
||||
{
|
||||
InitializeMaterialInstance(asset);
|
||||
}
|
||||
|
||||
|
||||
void MaterialComponentController::OnTick([[maybe_unused]] float deltaTime, [[maybe_unused]] AZ::ScriptTimePoint time)
|
||||
{
|
||||
AZStd::unordered_set<MaterialAssignmentId> materialsWithDirtyProperties;
|
||||
@@ -165,7 +166,7 @@ namespace AZ
|
||||
}
|
||||
}
|
||||
|
||||
// Only disconnect from tick bus and send notification after all pending properties have been applied
|
||||
// Only disconnect from tick bus and send notification after all pending properties have been applied
|
||||
if (m_materialsWithDirtyProperties.empty())
|
||||
{
|
||||
if (m_queuedMaterialUpdateNotification)
|
||||
@@ -221,7 +222,7 @@ namespace AZ
|
||||
ReleaseMaterials();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void MaterialComponentController::InitializeMaterialInstance(const Data::Asset<Data::AssetData>& asset)
|
||||
{
|
||||
bool allReady = true;
|
||||
@@ -326,7 +327,7 @@ namespace AZ
|
||||
// this function is called twice once material asset is changed, a temp variable is
|
||||
// needed to prevent material asset going out of scope during second call
|
||||
// before LoadMaterials() is called [LYN-2249]
|
||||
auto temp = m_configuration.m_materials;
|
||||
auto temp = m_configuration.m_materials;
|
||||
m_configuration.m_materials = materials;
|
||||
LoadMaterials();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user