AnimGraphParameterMaskHandler.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. #pragma once
  9. #if !defined(Q_MOC_RUN)
  10. #include <EMotionFX/Source/BlendTreeParameterNode.h>
  11. #include <Source/Editor/PropertyWidgets/AnimGraphParameterHandler.h>
  12. #include <QWidget>
  13. #endif
  14. namespace EMotionFX
  15. {
  16. // Handler to pick paramaters and get input/outputs in a node affected. The node has to implement IParameterPickerRule
  17. class AnimGraphParameterMaskHandler
  18. : public QObject
  19. , public AzToolsFramework::PropertyHandler<AZStd::vector<AZStd::string>, AnimGraphParameterPicker>
  20. {
  21. Q_OBJECT // AUTOMOC
  22. public:
  23. AZ_CLASS_ALLOCATOR_DECL
  24. AnimGraphParameterMaskHandler();
  25. AZ::u32 GetHandlerName() const override;
  26. QWidget* CreateGUI(QWidget* parent) override;
  27. bool AutoDelete() const override { return false; }
  28. void ConsumeAttribute(AnimGraphParameterPicker* widget, AZ::u32 attrib, AzToolsFramework::PropertyAttributeReader* attrValue, const char* debugName) override;
  29. void WriteGUIValuesIntoProperty(size_t index, AnimGraphParameterPicker* GUI, property_t& instance, AzToolsFramework::InstanceDataNode* node) override;
  30. bool ReadValuesIntoGUI(size_t index, AnimGraphParameterPicker* GUI, const property_t& instance, AzToolsFramework::InstanceDataNode* node) override;
  31. protected:
  32. ObjectAffectedByParameterChanges* m_object;
  33. };
  34. } // namespace EMotionFX