2019-12-27 09:26:59 -05:00
|
|
|
// Copyright Epic Games, Inc. All Rights Reserved.
|
2018-04-12 16:57:51 -04:00
|
|
|
|
2019-01-08 11:38:48 -05:00
|
|
|
#include "Graph/ControlRigGraphSchema.h"
|
|
|
|
|
#include "Graph/ControlRigGraph.h"
|
2022-09-10 00:03:16 -04:00
|
|
|
#include "Units/Execution/RigUnit_BeginExecution.h"
|
|
|
|
|
#include "Units/Execution/RigUnit_PrepareForExecution.h"
|
|
|
|
|
#include "Units/Execution/RigUnit_InverseExecution.h"
|
|
|
|
|
#include "Units/Execution/RigUnit_InteractionExecution.h"
|
2023-12-13 06:24:34 -05:00
|
|
|
#include "Units/Modules/RigUnit_ConnectorExecution.h"
|
2018-04-12 16:57:51 -04:00
|
|
|
|
2023-06-15 11:30:29 -04:00
|
|
|
|
2022-09-28 01:06:15 -04:00
|
|
|
#include UE_INLINE_GENERATED_CPP_BY_NAME(ControlRigGraphSchema)
|
|
|
|
|
|
2023-06-15 11:30:29 -04:00
|
|
|
|
2021-03-10 05:52:25 -04:00
|
|
|
|
2018-04-12 16:57:51 -04:00
|
|
|
#define LOCTEXT_NAMESPACE "ControlRigGraphSchema"
|
|
|
|
|
|
2023-06-15 11:30:29 -04:00
|
|
|
const FName UControlRigGraphSchema::GraphName_ControlRig(TEXT("Rig"));
|
2021-01-14 15:00:40 -04:00
|
|
|
|
2018-04-12 16:57:51 -04:00
|
|
|
UControlRigGraphSchema::UControlRigGraphSchema()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
FLinearColor UControlRigGraphSchema::GetPinTypeColor(const FEdGraphPinType& PinType) const
|
|
|
|
|
{
|
2019-04-02 11:26:55 -04:00
|
|
|
const FName& TypeName = PinType.PinCategory;
|
|
|
|
|
if (TypeName == UEdGraphSchema_K2::PC_Struct)
|
|
|
|
|
{
|
2020-01-22 17:58:55 -05:00
|
|
|
if (UStruct* Struct = Cast<UStruct>(PinType.PinSubCategoryObject))
|
2019-04-02 11:26:55 -04:00
|
|
|
{
|
2021-04-06 18:39:05 -04:00
|
|
|
if (Struct == FRigElementKey::StaticStruct() || Struct == FRigElementKeyCollection::StaticStruct())
|
|
|
|
|
{
|
|
|
|
|
return FLinearColor(0.0, 0.6588, 0.9490);
|
|
|
|
|
}
|
|
|
|
|
|
2021-05-27 16:53:52 -04:00
|
|
|
if (Struct == FRigElementKey::StaticStruct() || Struct == FRigPose::StaticStruct())
|
|
|
|
|
{
|
|
|
|
|
return FLinearColor(0.0, 0.3588, 0.5490);
|
|
|
|
|
}
|
2019-04-02 11:26:55 -04:00
|
|
|
}
|
|
|
|
|
}
|
2021-06-22 14:11:52 -04:00
|
|
|
|
2023-06-15 11:30:29 -04:00
|
|
|
return Super::GetPinTypeColor(PinType);
|
2018-04-12 16:57:51 -04:00
|
|
|
}
|
|
|
|
|
|
2023-06-15 11:30:29 -04:00
|
|
|
bool UControlRigGraphSchema::IsRigVMDefaultEvent(const FName& InEventName) const
|
2021-08-31 14:14:38 -04:00
|
|
|
{
|
2023-06-15 11:30:29 -04:00
|
|
|
if(Super::IsRigVMDefaultEvent(InEventName))
|
2021-06-09 04:45:19 -04:00
|
|
|
{
|
|
|
|
|
return true;
|
|
|
|
|
}
|
2022-01-06 04:42:27 -05:00
|
|
|
|
2022-06-03 05:50:33 -04:00
|
|
|
return InEventName == FRigUnit_BeginExecution::EventName ||
|
2023-11-16 08:04:18 -05:00
|
|
|
InEventName == FRigUnit_PreBeginExecution::EventName ||
|
|
|
|
|
InEventName == FRigUnit_PostBeginExecution::EventName ||
|
2022-06-03 05:50:33 -04:00
|
|
|
InEventName == FRigUnit_InverseExecution::EventName ||
|
|
|
|
|
InEventName == FRigUnit_PrepareForExecution::EventName ||
|
2023-12-13 06:24:34 -05:00
|
|
|
InEventName == FRigUnit_InteractionExecution::EventName ||
|
|
|
|
|
InEventName == FRigUnit_ConnectorExecution::EventName;
|
2022-06-03 05:50:33 -04:00
|
|
|
}
|
|
|
|
|
|
2021-04-06 18:39:05 -04:00
|
|
|
#undef LOCTEXT_NAMESPACE
|
2022-09-28 01:06:15 -04:00
|
|
|
|