2014-12-07 19:09:38 -05:00
|
|
|
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
|
2014-03-14 14:13:41 -04:00
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
#include "SoundClassGraphSchema.generated.h"
|
|
|
|
|
|
|
|
|
|
/** Action to add a node to the graph */
|
|
|
|
|
USTRUCT()
|
|
|
|
|
struct UNREALED_API FSoundClassGraphSchemaAction_NewNode : public FEdGraphSchemaAction
|
|
|
|
|
{
|
2015-03-17 06:17:32 -04:00
|
|
|
GENERATED_USTRUCT_BODY();
|
2014-03-14 14:13:41 -04:00
|
|
|
|
|
|
|
|
// Simple type info
|
2014-08-09 13:30:30 -04:00
|
|
|
static FName StaticGetTypeId() {static FName Type("FSoundClassGraphSchemaAction_NewNode"); return Type;}
|
2014-03-14 14:13:41 -04:00
|
|
|
|
|
|
|
|
FSoundClassGraphSchemaAction_NewNode()
|
|
|
|
|
: FEdGraphSchemaAction()
|
|
|
|
|
, NewSoundClassName(TEXT("ClassName"))
|
|
|
|
|
{}
|
|
|
|
|
|
2015-05-08 10:46:42 -04:00
|
|
|
FSoundClassGraphSchemaAction_NewNode(const FText& InNodeCategory, const FText& InMenuDesc, const FString& InToolTip, const int32 InGrouping)
|
2014-03-14 14:13:41 -04:00
|
|
|
: FEdGraphSchemaAction(InNodeCategory, InMenuDesc, InToolTip, InGrouping)
|
|
|
|
|
, NewSoundClassName(TEXT("ClassName"))
|
|
|
|
|
{}
|
|
|
|
|
|
|
|
|
|
// FEdGraphSchemaAction interface
|
2014-08-09 13:30:30 -04:00
|
|
|
virtual FName GetTypeId() const override { return StaticGetTypeId(); }
|
2014-06-13 06:14:46 -04:00
|
|
|
virtual UEdGraphNode* PerformAction(class UEdGraph* ParentGraph, UEdGraphPin* FromPin, const FVector2D Location, bool bSelectNewNode = true) override;
|
2014-03-14 14:13:41 -04:00
|
|
|
// End of FEdGraphSchemaAction interface
|
|
|
|
|
|
|
|
|
|
/** Name for the new SoundClass */
|
|
|
|
|
FString NewSoundClassName;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
UCLASS(MinimalAPI)
|
|
|
|
|
class USoundClassGraphSchema : public UEdGraphSchema
|
|
|
|
|
{
|
2015-03-17 06:17:32 -04:00
|
|
|
GENERATED_UCLASS_BODY()
|
2014-03-14 14:13:41 -04:00
|
|
|
|
|
|
|
|
/** Check whether connecting these pins would cause a loop */
|
|
|
|
|
bool ConnectionCausesLoop(const UEdGraphPin* InputPin, const UEdGraphPin* OutputPin) const;
|
|
|
|
|
/** Get menu for breaking links to specific nodes*/
|
|
|
|
|
void GetBreakLinkToSubMenuActions(class FMenuBuilder& MenuBuilder, class UEdGraphPin* InGraphPin);
|
|
|
|
|
|
|
|
|
|
// Begin EdGraphSchema interface
|
2014-06-13 06:14:46 -04:00
|
|
|
virtual void GetGraphContextActions(FGraphContextMenuBuilder& ContextMenuBuilder) const override;
|
|
|
|
|
virtual void GetContextMenuActions(const UEdGraph* CurrentGraph, const UEdGraphNode* InGraphNode, const UEdGraphPin* InGraphPin, class FMenuBuilder* MenuBuilder, bool bIsDebugging) const override;
|
|
|
|
|
virtual const FPinConnectionResponse CanCreateConnection(const UEdGraphPin* PinA, const UEdGraphPin* PinB) const override;
|
|
|
|
|
virtual bool TryCreateConnection(UEdGraphPin* PinA, UEdGraphPin* PinB) const override;
|
|
|
|
|
virtual bool ShouldHidePinDefaultValue(UEdGraphPin* Pin) const override;
|
|
|
|
|
virtual FLinearColor GetPinTypeColor(const FEdGraphPinType& PinType) const override;
|
|
|
|
|
virtual void BreakNodeLinks(UEdGraphNode& TargetNode) const override;
|
|
|
|
|
virtual void BreakPinLinks(UEdGraphPin& TargetPin, bool bSendsNodeNotifcation) const override;
|
|
|
|
|
virtual void BreakSinglePinLink(UEdGraphPin* SourcePin, UEdGraphPin* TargetPin) override;
|
|
|
|
|
virtual void DroppedAssetsOnGraph(const TArray<class FAssetData>& Assets, const FVector2D& GraphPosition, UEdGraph* Graph) const override;
|
2014-03-14 14:13:41 -04:00
|
|
|
// End EdGraphSchema interface
|
|
|
|
|
};
|
|
|
|
|
|