From a4321baecc8b28dcec9a73eb3eb32480249b8af3 Mon Sep 17 00:00:00 2001 From: santorac <55155825+santorac@users.noreply.github.com> Date: Thu, 21 Oct 2021 17:00:06 -0700 Subject: [PATCH] Hopefully fix a Jenkins build failure about "function cannot access 'AZ::RPI::MaterialVersionUpdate::RenamePropertyAction::m_fromPropertyId'" Signed-off-by: santorac <55155825+santorac@users.noreply.github.com> --- .../RPI.Reflect/Material/MaterialVersionUpdate.h | 2 ++ .../Material/MaterialVersionUpdate.cpp | 16 ++++++++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Reflect/Material/MaterialVersionUpdate.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Reflect/Material/MaterialVersionUpdate.h index 0acd1d4432..eb71ad9cb7 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Reflect/Material/MaterialVersionUpdate.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Reflect/Material/MaterialVersionUpdate.h @@ -32,6 +32,8 @@ namespace AZ struct RenamePropertyAction { AZ_TYPE_INFO(AZ::RPI::MaterialVersionUpdate::RenameAction, "{A1FBEB19-EA05-40F0-9700-57D048DF572B}"); + + static void Reflect(ReflectContext* context); AZ::Name m_fromPropertyId; AZ::Name m_toPropertyId; diff --git a/Gems/Atom/RPI/Code/Source/RPI.Reflect/Material/MaterialVersionUpdate.cpp b/Gems/Atom/RPI/Code/Source/RPI.Reflect/Material/MaterialVersionUpdate.cpp index bf503f3c67..b387e502e2 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Reflect/Material/MaterialVersionUpdate.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Reflect/Material/MaterialVersionUpdate.cpp @@ -14,16 +14,24 @@ namespace AZ { namespace RPI { - void MaterialVersionUpdate::Reflect(ReflectContext* context) + void MaterialVersionUpdate::RenamePropertyAction::Reflect(ReflectContext* context) { if (auto* serializeContext = azrtti_cast(context)) { - serializeContext->Class() + serializeContext->Class() ->Version(1) - ->Field("From", &MaterialVersionUpdate::RenamePropertyAction::m_fromPropertyId) - ->Field("To", &MaterialVersionUpdate::RenamePropertyAction::m_toPropertyId) + ->Field("From", &RenamePropertyAction::m_fromPropertyId) + ->Field("To", &RenamePropertyAction::m_toPropertyId) ; + } + } + + void MaterialVersionUpdate::Reflect(ReflectContext* context) + { + MaterialVersionUpdate::RenamePropertyAction::Reflect(context); + if (auto* serializeContext = azrtti_cast(context)) + { serializeContext->RegisterGenericType(); serializeContext->Class()