EditorVegetationSystemComponent.cpp 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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 "EditorVegetationSystemComponent.h"
  9. #include <Vegetation/Editor/EditorAreaComponentBase.h>
  10. #include <Vegetation/Editor/EditorVegetationComponentBase.h>
  11. #include <AzToolsFramework/UI/PropertyEditor/GenericComboBoxCtrl.h>
  12. namespace Vegetation
  13. {
  14. void EditorVegetationSystemComponent::GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& services)
  15. {
  16. services.push_back(AZ_CRC("EditorVegetationSystemService", 0xfc666830));
  17. }
  18. void EditorVegetationSystemComponent::GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& services)
  19. {
  20. services.push_back(AZ_CRC("EditorVegetationSystemService", 0xfc666830));
  21. }
  22. void EditorVegetationSystemComponent::GetRequiredServices([[maybe_unused]] AZ::ComponentDescriptor::DependencyArrayType& services)
  23. {
  24. }
  25. void EditorVegetationSystemComponent::Reflect(AZ::ReflectContext* context)
  26. {
  27. if (AZ::SerializeContext* serialize = azrtti_cast<AZ::SerializeContext*>(context))
  28. {
  29. serialize->Class<EditorVegetationSystemComponent, AZ::Component>()
  30. ->Version(0)
  31. ;
  32. if (AZ::EditContext* editContext = serialize->GetEditContext())
  33. {
  34. editContext->Class<EditorVegetationSystemComponent>("Editor Vegetation System", "Manages and discovers surface tag list assets that define the dictionary of selectable tags at edit time")
  35. ->ClassElement(AZ::Edit::ClassElements::EditorData, "")
  36. ->Attribute(AZ::Edit::Attributes::Category, "Vegetation")
  37. ->Attribute(AZ::Edit::Attributes::AutoExpand, true)
  38. ;
  39. }
  40. }
  41. }
  42. void EditorVegetationSystemComponent::Activate()
  43. {
  44. // This is necessary for the m_spawnerType in Descriptor.cpp to display properly as a ComboBox
  45. AzToolsFramework::RegisterGenericComboBoxHandler<AZ::TypeId>();
  46. }
  47. void EditorVegetationSystemComponent::Deactivate()
  48. {
  49. }
  50. }