DataConnectionVisualComponent.cpp 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  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 <AzCore/Serialization/SerializeContext.h>
  9. #include <Components/Connections/DataConnections/DataConnectionVisualComponent.h>
  10. #include <Components/Connections/DataConnections/DataConnectionGraphicsItem.h>
  11. namespace GraphCanvas
  12. {
  13. //////////////////////////////////
  14. // DataConnectionVisualComponent
  15. //////////////////////////////////
  16. void DataConnectionVisualComponent::Reflect(AZ::ReflectContext* reflectContext)
  17. {
  18. AZ::SerializeContext* serializeContext = azrtti_cast<AZ::SerializeContext*>(reflectContext);
  19. if (serializeContext)
  20. {
  21. serializeContext->Class<DataConnectionVisualComponent, ConnectionVisualComponent>()
  22. ->Version(1)
  23. ;
  24. }
  25. }
  26. void DataConnectionVisualComponent::CreateConnectionVisual()
  27. {
  28. m_connectionGraphicsItem = AZStd::make_unique<DataConnectionGraphicsItem>(GetEntityId());
  29. }
  30. }