EditorModelPreset.cpp 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  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. #undef RC_INVOKED
  9. #include <Atom/Feature/Utils/EditorModelPreset.h>
  10. #include <Atom/Feature/Utils/ModelPreset.h>
  11. #include <AzCore/Serialization/SerializeContext.h>
  12. #include <AzCore/Serialization/EditContext.h>
  13. namespace AZ
  14. {
  15. namespace Render
  16. {
  17. void EditorModelPreset::Reflect(AZ::ReflectContext* context)
  18. {
  19. if (auto serializeContext = azrtti_cast<AZ::SerializeContext*>(context))
  20. {
  21. if (auto editContext = serializeContext->GetEditContext())
  22. {
  23. editContext->Class<ModelPreset>(
  24. "ModelPreset", "")
  25. ->ClassElement(AZ::Edit::ClassElements::EditorData, "")
  26. ->Attribute(AZ::Edit::Attributes::AutoExpand, true)
  27. ->DataElement(AZ::Edit::UIHandlers::Default, &ModelPreset::m_modelAsset, "Model Asset", "Model asset reference")
  28. ;
  29. }
  30. }
  31. }
  32. }
  33. }