3
0

AtomToolsFrameworkSystemComponent.cpp 3.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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 <AtomToolsFramework/Document/AtomToolsAnyDocument.h>
  9. #include <AtomToolsFramework/Document/AtomToolsDocument.h>
  10. #include <AtomToolsFramework/Document/AtomToolsDocumentSystem.h>
  11. #include <AtomToolsFramework/DynamicProperty/DynamicPropertyGroup.h>
  12. #include <AtomToolsFramework/EntityPreviewViewport/EntityPreviewViewportSettingsSystem.h>
  13. #include <AtomToolsFramework/Graph/DynamicNode/DynamicNode.h>
  14. #include <AtomToolsFramework/Graph/DynamicNode/DynamicNodeManager.h>
  15. #include <AtomToolsFramework/Graph/DynamicNode/DynamicNodePaletteItem.h>
  16. #include <AtomToolsFramework/Graph/GraphCompiler.h>
  17. #include <AtomToolsFramework/Graph/GraphDocument.h>
  18. #include <AtomToolsFramework/Graph/GraphViewConstructPresets.h>
  19. #include <AtomToolsFramework/Graph/GraphViewSettings.h>
  20. #include <AtomToolsFramework/Inspector/InspectorWidget.h>
  21. #include <AtomToolsFrameworkSystemComponent.h>
  22. #include <AzCore/RTTI/BehaviorContext.h>
  23. #include <AzCore/Serialization/EditContext.h>
  24. #include <AzCore/Serialization/SerializeContext.h>
  25. #include <Inspector/PropertyWidgets/PropertyStringBrowseEditCtrl.h>
  26. namespace AtomToolsFramework
  27. {
  28. void AtomToolsFrameworkSystemComponent::Reflect(AZ::ReflectContext* context)
  29. {
  30. AtomToolsDocument::Reflect(context);
  31. AtomToolsAnyDocument::Reflect(context);
  32. AtomToolsDocumentSystem::Reflect(context);
  33. CreateDynamicNodeMimeEvent::Reflect(context);
  34. DynamicNode::Reflect(context);
  35. DynamicProperty::Reflect(context);
  36. DynamicPropertyGroup::Reflect(context);
  37. EntityPreviewViewportSettingsSystem::Reflect(context);
  38. GraphCompiler::Reflect(context);
  39. GraphDocument::Reflect(context);
  40. GraphViewSettings::Reflect(context);
  41. GraphViewConstructPresets::Reflect(context);
  42. InspectorWidget::Reflect(context);
  43. if (auto serialize = azrtti_cast<AZ::SerializeContext*>(context))
  44. {
  45. serialize->RegisterGenericType<AZStd::unordered_map<AZStd::string, bool>>();
  46. serialize->RegisterGenericType<AZStd::map<AZStd::string, AZStd::vector<AZStd::string>>>();
  47. serialize->Class<AtomToolsFrameworkSystemComponent, AZ::Component>()
  48. ->Version(0)
  49. ;
  50. if (auto editContext = serialize->GetEditContext())
  51. {
  52. editContext->Class<AtomToolsFrameworkSystemComponent>("AtomToolsFrameworkSystemComponent", "")
  53. ->ClassElement(AZ::Edit::ClassElements::EditorData, "")
  54. ->Attribute(AZ::Edit::Attributes::AutoExpand, true)
  55. ;
  56. }
  57. }
  58. }
  59. void AtomToolsFrameworkSystemComponent::GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided)
  60. {
  61. provided.push_back(AZ_CRC_CE("AtomToolsFrameworkSystemService"));
  62. }
  63. void AtomToolsFrameworkSystemComponent::GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible)
  64. {
  65. incompatible.push_back(AZ_CRC_CE("AtomToolsFrameworkSystemService"));
  66. }
  67. void AtomToolsFrameworkSystemComponent::GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required)
  68. {
  69. AZ_UNUSED(required);
  70. }
  71. void AtomToolsFrameworkSystemComponent::GetDependentServices(AZ::ComponentDescriptor::DependencyArrayType& dependent)
  72. {
  73. AZ_UNUSED(dependent);
  74. }
  75. void AtomToolsFrameworkSystemComponent::Init()
  76. {
  77. }
  78. void AtomToolsFrameworkSystemComponent::Activate()
  79. {
  80. RegisterStringBrowseEditHandler();
  81. }
  82. void AtomToolsFrameworkSystemComponent::Deactivate()
  83. {
  84. }
  85. }