MaterialDynamicMetadata.cpp 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /*
  2. * Copyright (c) Contributors to the Open 3D Engine Project.
  3. * For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. *
  5. * SPDX-License-Identifier: Apache-2.0 OR MIT
  6. *
  7. */
  8. #include <Atom/RPI.Reflect/Material/MaterialDynamicMetadata.h>
  9. #include <AzCore/RTTI/BehaviorContext.h>
  10. namespace AZ
  11. {
  12. namespace RPI
  13. {
  14. void ReflectMaterialDynamicMetadata(ReflectContext* context)
  15. {
  16. if (auto* serializeContext = azrtti_cast<SerializeContext*>(context))
  17. {
  18. serializeContext->Enum<MaterialPropertyVisibility>()
  19. ->Value("Enabled", MaterialPropertyVisibility::Enabled)
  20. ->Value("Disabled", MaterialPropertyVisibility::Disabled)
  21. ->Value("Hidden", MaterialPropertyVisibility::Hidden)
  22. ;
  23. serializeContext->Enum<MaterialPropertyGroupVisibility>()
  24. ->Value("Enabled", MaterialPropertyGroupVisibility::Enabled)
  25. ->Value("Hidden", MaterialPropertyGroupVisibility::Hidden)
  26. ;
  27. }
  28. if (auto* behaviorContext = azrtti_cast<BehaviorContext*>(context))
  29. {
  30. behaviorContext
  31. ->Enum<(int)MaterialPropertyVisibility::Enabled>("MaterialPropertyVisibility_Enabled")
  32. ->Enum<(int)MaterialPropertyVisibility::Disabled>("MaterialPropertyVisibility_Disabled")
  33. ->Enum<(int)MaterialPropertyVisibility::Hidden>("MaterialPropertyVisibility_Hidden");
  34. behaviorContext
  35. ->Enum<(int)MaterialPropertyGroupVisibility::Enabled>("MaterialPropertyGroupVisibility_Enabled")
  36. ->Enum<(int)MaterialPropertyGroupVisibility::Hidden>("MaterialPropertyGroupVisibility_Hidden");
  37. }
  38. }
  39. } // namespace RPI
  40. } // namespace AZ