第一次提交
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
// Copyright 2025 https://yuewu.dev/en All Rights Reserved.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "Kismet/BlueprintFunctionLibrary.h"
|
||||
#include "GMS_EditorUtilityLibrary.generated.h"
|
||||
|
||||
class UAnimationModifier;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UCLASS(Blueprintable)
|
||||
class GENERICMOVEMENTEDITOR_API UGMS_EditorUtilityLibrary : public UBlueprintFunctionLibrary
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
#if WITH_EDITOR
|
||||
UFUNCTION(BlueprintCallable, Category="GMS|Development|Editor")
|
||||
static void RevertAnimModifierOfClass(TSubclassOf<UAnimationModifier> ModifierClass);
|
||||
|
||||
UFUNCTION(BlueprintCallable, BlueprintPure, Category="GMS|Development|Editor")
|
||||
static float GetSamplingFrameRate(const UAnimSequence* AnimSequence);
|
||||
|
||||
UFUNCTION(BlueprintCallable, BlueprintPure, Category="GMS|Development|Editor")
|
||||
static TArray<FName> GetAllCurveNames(const UAnimSequence* AnimSequence);
|
||||
#endif
|
||||
};
|
||||
@@ -0,0 +1,33 @@
|
||||
// Copyright 2025 https://yuewu.dev/en All Rights Reserved.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "AssetTypeActions/AssetTypeActions_DataAsset.h"
|
||||
|
||||
class FGMS_AssetTypeAction : public FAssetTypeActions_DataAsset
|
||||
{
|
||||
public:
|
||||
virtual uint32 GetCategories() override;
|
||||
virtual FColor GetTypeColor() const override;
|
||||
};
|
||||
|
||||
#define DEFINE_GMS_ASSET_ACTION(ActionName) \
|
||||
class FGMS_AssetTypeAction_##ActionName final : public FGMS_AssetTypeAction \
|
||||
{ \
|
||||
public: \
|
||||
virtual FText GetName() const override; \
|
||||
virtual FText GetAssetDescription(const FAssetData& AssetData) const override; \
|
||||
virtual UClass* GetSupportedClass() const override; \
|
||||
};
|
||||
|
||||
DEFINE_GMS_ASSET_ACTION(MovementDefinition)
|
||||
|
||||
DEFINE_GMS_ASSET_ACTION(MovementControlSetting_Default)
|
||||
|
||||
DEFINE_GMS_ASSET_ACTION(AnimGraphSetting)
|
||||
|
||||
DEFINE_GMS_ASSET_ACTION(AnimLayerSetting_States_Default)
|
||||
|
||||
DEFINE_GMS_ASSET_ACTION(AnimLayerSetting_Overlay_PoseStack)
|
||||
|
||||
DEFINE_GMS_ASSET_ACTION(AnimLayerSetting_Overlay_SequenceStack)
|
||||
@@ -0,0 +1,89 @@
|
||||
// Copyright 2025 https://yuewu.dev/en All Rights Reserved.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "UObject/ObjectMacros.h"
|
||||
#include "Templates/SubclassOf.h"
|
||||
#include "Factories/Factory.h"
|
||||
#include "GMS_DataAssetsFactories.generated.h"
|
||||
|
||||
UCLASS(Abstract)
|
||||
class UGMS_Factory : public UFactory
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
UGMS_Factory(const FObjectInitializer& ObjectInitializer);
|
||||
virtual uint32 GetMenuCategories() const override;
|
||||
virtual const TArray<FText>& GetMenuCategorySubMenus() const override;
|
||||
};
|
||||
|
||||
#define DEFINE_GMS_FACTORY(FactoryName) \
|
||||
UCLASS() \
|
||||
class UGMS_Factory_##FactoryName : public UGMS_Factory \
|
||||
{ \
|
||||
GENERATED_BODY() \
|
||||
public: \
|
||||
UGMS_Factory_##FactoryName(const FObjectInitializer& ObjectInitializer); \
|
||||
virtual UObject* FactoryCreateNew(UClass* Class, UObject* InParent, FName Name, EObjectFlags Flags, UObject* Context, FFeedbackContext* Warn) override; \
|
||||
};
|
||||
|
||||
UCLASS()
|
||||
class UGMS_Factory_MovementDefinition : public UGMS_Factory
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
UGMS_Factory_MovementDefinition(const FObjectInitializer& ObjectInitializer);
|
||||
virtual UObject* FactoryCreateNew(UClass* Class, UObject* InParent, FName Name, EObjectFlags Flags, UObject* Context, FFeedbackContext* Warn) override;
|
||||
};
|
||||
|
||||
UCLASS()
|
||||
class UGMS_Factory_MovementControlSetting_Default : public UGMS_Factory
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
UGMS_Factory_MovementControlSetting_Default(const FObjectInitializer& ObjectInitializer);
|
||||
virtual UObject* FactoryCreateNew(UClass* Class, UObject* InParent, FName Name, EObjectFlags Flags, UObject* Context, FFeedbackContext* Warn) override;
|
||||
};
|
||||
|
||||
UCLASS()
|
||||
class UGMS_Factory_AnimGraphSetting : public UGMS_Factory
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
UGMS_Factory_AnimGraphSetting(const FObjectInitializer& ObjectInitializer);
|
||||
virtual UObject* FactoryCreateNew(UClass* Class, UObject* InParent, FName Name, EObjectFlags Flags, UObject* Context, FFeedbackContext* Warn) override;
|
||||
};
|
||||
|
||||
UCLASS()
|
||||
class UGMS_Factory_AnimLayerSetting_States_Default : public UGMS_Factory
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
UGMS_Factory_AnimLayerSetting_States_Default(const FObjectInitializer& ObjectInitializer);
|
||||
virtual UObject* FactoryCreateNew(UClass* Class, UObject* InParent, FName Name, EObjectFlags Flags, UObject* Context, FFeedbackContext* Warn) override;
|
||||
};
|
||||
|
||||
UCLASS()
|
||||
class UGMS_Factory_AnimLayerSetting_Overlay_PoseStack : public UGMS_Factory
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
UGMS_Factory_AnimLayerSetting_Overlay_PoseStack(const FObjectInitializer& ObjectInitializer);
|
||||
virtual UObject* FactoryCreateNew(UClass* Class, UObject* InParent, FName Name, EObjectFlags Flags, UObject* Context, FFeedbackContext* Warn) override;
|
||||
};
|
||||
|
||||
UCLASS()
|
||||
class UGMS_Factory_AnimLayerSetting_Overlay_SequenceStack : public UGMS_Factory
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
UGMS_Factory_AnimLayerSetting_Overlay_SequenceStack(const FObjectInitializer& ObjectInitializer);
|
||||
virtual UObject* FactoryCreateNew(UClass* Class, UObject* InParent, FName Name, EObjectFlags Flags, UObject* Context, FFeedbackContext* Warn) override;
|
||||
};
|
||||
@@ -0,0 +1,27 @@
|
||||
// Copyright 2025 https://yuewu.dev/en All Rights Reserved.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "AnimGraphNode_Base.h"
|
||||
#include "Nodes/GMS_AnimNode_CurvesBlend.h"
|
||||
#include "UObject/Object.h"
|
||||
#include "GMS_AnimGraphNode_CurvesBlend.generated.h"
|
||||
|
||||
|
||||
UCLASS()
|
||||
class GENERICMOVEMENTEDITOR_API UGMS_AnimGraphNode_CurvesBlend : public UAnimGraphNode_Base
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
protected:
|
||||
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Settings")
|
||||
FGMS_AnimNode_CurvesBlend Node;
|
||||
|
||||
public:
|
||||
virtual FText GetNodeTitle(ENodeTitleType::Type TitleType) const override;
|
||||
|
||||
virtual FText GetTooltipText() const override;
|
||||
|
||||
virtual FString GetNodeCategory() const override;
|
||||
};
|
||||
@@ -0,0 +1,35 @@
|
||||
// Copyright 2025 https://yuewu.dev/en All Rights Reserved.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "AnimGraphNode_BlendListBase.h"
|
||||
#include "Nodes/GMS_AnimNode_GameplayTagsBlend.h"
|
||||
#include "GMS_AnimGraphNode_GameplayTagsBlend.generated.h"
|
||||
|
||||
UCLASS()
|
||||
class GENERICMOVEMENTEDITOR_API UGMS_AnimGraphNode_GameplayTagsBlend : public UAnimGraphNode_BlendListBase
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
protected:
|
||||
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category="Settings")
|
||||
FGMS_AnimNode_GameplayTagsBlend Node;
|
||||
|
||||
public:
|
||||
UGMS_AnimGraphNode_GameplayTagsBlend();
|
||||
|
||||
virtual void PostEditChangeProperty(FPropertyChangedEvent &PropertyChangedEvent) override;
|
||||
|
||||
virtual FText GetNodeTitle(ENodeTitleType::Type TitleType) const override;
|
||||
|
||||
virtual FText GetTooltipText() const override;
|
||||
|
||||
virtual void ReallocatePinsDuringReconstruction(TArray<UEdGraphPin *> &PreviousPins) override;
|
||||
|
||||
virtual FString GetNodeCategory() const override;
|
||||
|
||||
virtual void CustomizePinData(UEdGraphPin *Pin, FName SourcePropertyName, int32 PinIndex) const override;
|
||||
|
||||
protected:
|
||||
static void GetBlendPinProperties(const UEdGraphPin *Pin, bool &bBlendPosePin, bool &bBlendTimePin);
|
||||
};
|
||||
@@ -0,0 +1,44 @@
|
||||
// Copyright 2025 https://yuewu.dev/en All Rights Reserved.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "UObject/ObjectMacros.h"
|
||||
#include "AnimGraphNode_BlendListBase.h"
|
||||
#include "Nodes/GMS_AnimNode_LayeredBoneBlend.h"
|
||||
#include "GMS_AnimGraphNode_LayeredBoneBlend.generated.h"
|
||||
|
||||
UCLASS(MinimalAPI)
|
||||
class UGMS_AnimGraphNode_LayeredBoneBlend : public UAnimGraphNode_BlendListBase
|
||||
{
|
||||
GENERATED_UCLASS_BODY()
|
||||
UPROPERTY(EditAnywhere, Category=Settings)
|
||||
FGMS_AnimNode_LayeredBoneBlend Node;
|
||||
|
||||
// Adds a new pose pin
|
||||
//@TODO: Generalize this behavior (returning a list of actions/delegates maybe?)
|
||||
GENERICMOVEMENTEDITOR_API virtual void AddPinToBlendByFilter();
|
||||
GENERICMOVEMENTEDITOR_API virtual void RemovePinFromBlendByFilter(UEdGraphPin* Pin);
|
||||
|
||||
// UObject interface
|
||||
// End of UObject interface
|
||||
|
||||
// UEdGraphNode interface
|
||||
virtual FLinearColor GetNodeTitleColor() const override;
|
||||
virtual FText GetTooltipText() const override;
|
||||
virtual FText GetNodeTitle(ENodeTitleType::Type TitleType) const override;
|
||||
// End of UEdGraphNode interface
|
||||
|
||||
// UK2Node interface
|
||||
virtual void GetNodeContextMenuActions(class UToolMenu* Menu, class UGraphNodeContextMenuContext* Context) const override;
|
||||
// End of UK2Node interface
|
||||
|
||||
// UAnimGraphNode_Base interface
|
||||
virtual FString GetNodeCategory() const override;
|
||||
// End of UAnimGraphNode_Base interface
|
||||
|
||||
|
||||
// Gives each visual node a chance to validate that they are still valid in the context of the compiled class, giving a last shot at error or warning generation after primary compilation is finished
|
||||
virtual void ValidateAnimNodeDuringCompilation(class USkeleton* ForSkeleton, class FCompilerResultsLog& MessageLog) override;
|
||||
// End of UAnimGraphNode_Base interface
|
||||
};
|
||||
@@ -0,0 +1,38 @@
|
||||
// Copyright 2025 https://yuewu.dev/en All Rights Reserved.
|
||||
|
||||
#pragma once
|
||||
#include "AnimGraphNode_SkeletalControlBase.h"
|
||||
#include "Nodes/GMS_AnimNode_OrientationWarping.h"
|
||||
#include "GMS_AnimGraphNode_OrientationWarping.generated.h"
|
||||
|
||||
UCLASS()
|
||||
class UGMS_AnimGraphNode_OrientationWarping : public UAnimGraphNode_SkeletalControlBase
|
||||
{
|
||||
GENERATED_UCLASS_BODY()
|
||||
|
||||
UPROPERTY(EditAnywhere, Category="Settings")
|
||||
FGMS_AnimNode_OrientationWarping Node;
|
||||
|
||||
public:
|
||||
// UEdGraphNode interface
|
||||
virtual FText GetNodeTitle(ENodeTitleType::Type TitleType) const override;
|
||||
virtual FLinearColor GetNodeTitleColor() const override;
|
||||
virtual FText GetTooltipText() const override;
|
||||
virtual FString GetNodeCategory() const override;
|
||||
virtual void CustomizeDetails(IDetailLayoutBuilder& DetailBuilder) override;
|
||||
virtual void PostEditChangeProperty(struct FPropertyChangedEvent& PropertyChangedEvent) override;
|
||||
virtual void GetInputLinkAttributes(FNodeAttributeArray& OutAttributes) const override;
|
||||
virtual void GetOutputLinkAttributes(FNodeAttributeArray& OutAttributes) const override;
|
||||
virtual void ValidateAnimNodeDuringCompilation(USkeleton* ForSkeleton, FCompilerResultsLog& MessageLog) override;
|
||||
// End of UEdGraphNode interface
|
||||
|
||||
protected:
|
||||
// UAnimGraphNode_Base interface
|
||||
virtual void CustomizePinData(UEdGraphPin* Pin, FName SourcePropertyName, int32 ArrayIndex) const override;
|
||||
// End of UAnimGraphNode_Base interface
|
||||
|
||||
// UAnimGraphNode_SkeletalControlBase interface
|
||||
virtual FText GetControllerDescription() const override;
|
||||
virtual const FAnimNode_SkeletalControlBase* GetNode() const override { return &Node; }
|
||||
// End of UAnimGraphNode_SkeletalControlBase interface
|
||||
};
|
||||
Reference in New Issue
Block a user