// Copyright Epic Games, Inc. All Rights Reserved. #pragma once #include "Containers/Array.h" #include "Delegates/IDelegateInstance.h" #include "Internationalization/Text.h" #include "Modules/ModuleInterface.h" #include "Templates/SharedPointer.h" #include "UObject/NameTypes.h" #include "WorkflowOrientedApp/WorkflowCentricApplication.h" class FApplicationMode; class FExtender; class FUICommandList; class ISkeletalMeshEditor; class SClothPaintTab; class UEditorExperimentalSettings; CLOTHPAINTER_API extern const FName PaintModeID; class FClothPaintingModule : public IModuleInterface { public: virtual void StartupModule() override; virtual void ShutdownModule() override; // Setup and register our editmode void SetupMode(); // Unregister and shut down our edit mode void ShutdownMode(); protected: // Extends the skeletal mesh editor mode TSharedRef ExtendApplicationMode(const FName ModeName, TSharedRef InMode); protected: TArray> RegisteredApplicationModes; FWorkflowApplicationModeExtender Extender; private: // Extend toolbars and menus void RegisterMenus(); // Extends a skeletal mesh editor instance toolbar TSharedRef ExtendSkelMeshEditorToolbar(const TSharedRef InCommandList, TSharedRef InSkeletalMeshEditor); // Handle for the extender delegate we created FDelegateHandle SkelMeshEditorExtenderHandle; // Gets text for the enable paint tools button FText GetPaintToolsButtonText(TWeakPtr InSkeletalMeshEditor) const; // Gets tool tip for the enable paint tools button FText GetPaintToolsButtonToolTip(TWeakPtr InSkeletalMeshEditor) const; // Toggles paint mode on the clothing tab void OnToggleMode(TWeakPtr InSkeletalMeshEditor) const; // Return true if currently in paint mode bool IsPaintModeActive(TWeakPtr InSkeletalMeshEditor) const; // Gets the current active clothing tab, will invoke (spawn or draw attention to) if bInvoke == true TSharedPtr GetActiveClothTab(TWeakPtr InSkeletalMeshEditor, bool bInvoke = true) const; };