本文整理汇总了C++中CreatePin函数的典型用法代码示例。如果您正苦于以下问题:C++ CreatePin函数的具体用法?C++ CreatePin怎么用?C++ CreatePin使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了CreatePin函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CreatePin
void UK2Node_GetEnumeratorName::AllocateDefaultPins()
{
const UEdGraphSchema_K2* Schema = GetDefault<UEdGraphSchema_K2>();
CreatePin(EGPD_Input, Schema->PC_Byte, TEXT(""), NULL, false, false, EnumeratorPinName);
CreatePin(EGPD_Output, Schema->PC_Name, TEXT(""), NULL, false, false, Schema->PN_ReturnValue);
}
示例2: PreloadObject
void UK2Node_MatineeController::AllocateDefaultPins()
{
const UEdGraphSchema_K2* K2Schema = GetDefault<UEdGraphSchema_K2>();
// Preload the matinee data, if needed, so that we can have all the event tracks we need
if (MatineeActor != NULL)
{
PreloadObject(MatineeActor);
PreloadObject(MatineeActor->MatineeData);
}
// Create the "finished" playing pin
CreatePin(EGPD_Output, K2Schema->PC_Exec, TEXT(""), NULL, false, false, K2Schema->PN_MatineeFinished);
// Create pins for each event
if(MatineeActor != NULL && MatineeActor->MatineeData != NULL)
{
TArray<FName> EventNames;
MatineeActor->MatineeData->GetAllEventNames(EventNames);
for(int32 i=0; i<EventNames.Num(); i++)
{
FName EventName = EventNames[i];
CreatePin(EGPD_Output, K2Schema->PC_Exec, TEXT(""), NULL, false, false, EventName.ToString());
}
}
Super::AllocateDefaultPins();
}
示例3: CreatePin
void UK2Node_Composite::AllocateDefaultPins()
{
UK2Node::AllocateDefaultPins();
if (OutputSourceNode)
{
for (TArray<UEdGraphPin*>::TIterator PinIt(OutputSourceNode->Pins); PinIt; ++PinIt)
{
UEdGraphPin* PortPin = *PinIt;
if (PortPin->Direction == EGPD_Input)
{
UEdGraphPin* NewPin = CreatePin(UEdGraphPin::GetComplementaryDirection(PortPin->Direction), PortPin->PinType, PortPin->PinName);
NewPin->DefaultValue = NewPin->AutogeneratedDefaultValue = PortPin->DefaultValue;
}
}
}
if (InputSinkNode)
{
for (TArray<UEdGraphPin*>::TIterator PinIt(InputSinkNode->Pins); PinIt; ++PinIt)
{
UEdGraphPin* PortPin = *PinIt;
if (PortPin->Direction == EGPD_Output)
{
UEdGraphPin* NewPin = CreatePin(UEdGraphPin::GetComplementaryDirection(PortPin->Direction), PortPin->PinType, PortPin->PinName);
NewPin->DefaultValue = NewPin->AutogeneratedDefaultValue = PortPin->DefaultValue;
}
}
}
}
示例4: CreatePin
void UGameplayTagsK2Node_LiteralGameplayTag::AllocateDefaultPins()
{
const UEdGraphSchema_K2* K2Schema = GetDefault<UEdGraphSchema_K2>();
CreatePin(EGPD_Input, K2Schema->PC_String, TEXT("LiteralGameplayTagContainer"), NULL, false, false, TEXT("TagIn"));
CreatePin(EGPD_Output, K2Schema->PC_Struct, TEXT(""), FGameplayTagContainer::StaticStruct(), false, false, K2Schema->PN_ReturnValue);
}
示例5: CreatePin
void UK2Node_FunctionEntry::AllocateDefaultPins()
{
const UEdGraphSchema_K2* K2Schema = GetDefault<UEdGraphSchema_K2>();
CreatePin(EGPD_Output, K2Schema->PC_Exec, TEXT(""), NULL, false, false, K2Schema->PN_Then);
UFunction* Function = FindField<UFunction>(SignatureClass, SignatureName);
if (Function == nullptr)
{
Function = FindDelegateSignature(SignatureName);
}
if (Function != NULL)
{
CreatePinsForFunctionEntryExit(Function, /*bIsFunctionEntry=*/ true);
}
Super::AllocateDefaultPins();
if (FFunctionEntryHelper::RequireWorldContextParameter(this)
&& ensure(!FindPin(FFunctionEntryHelper::GetWorldContextPinName())))
{
UEdGraphPin* WorldContextPin = CreatePin(
EGPD_Output,
K2Schema->PC_Object,
FString(),
UObject::StaticClass(),
false,
false,
FFunctionEntryHelper::GetWorldContextPinName());
WorldContextPin->bHidden = true;
}
}
示例6: CreatePin
void UBehaviorTreeGraphNode_SimpleParallel::AllocateDefaultPins()
{
CreatePin(EGPD_Input, UBehaviorTreeEditorTypes::PinCategory_MultipleNodes, TEXT(""), NULL, false, false, TEXT("In"));
CreatePin(EGPD_Output, UBehaviorTreeEditorTypes::PinCategory_SingleTask, TEXT(""), NULL, false, false, TEXT("Task"));
CreatePin(EGPD_Output, UBehaviorTreeEditorTypes::PinCategory_SingleNode, TEXT(""), NULL, false, false, TEXT("Out"));
}
示例7: CreatePin
void UK2Node_BaseMCDelegate::AllocateDefaultPins()
{
Super::AllocateDefaultPins();
const UEdGraphSchema_K2* K2Schema = GetDefault<UEdGraphSchema_K2>();
CreatePin(EGPD_Input, K2Schema->PC_Exec, TEXT(""), NULL, false, false, K2Schema->PN_Execute);
CreatePin(EGPD_Output, K2Schema->PC_Exec, TEXT(""), NULL, false, false, K2Schema->PN_Then);
UEdGraphPin* SelfPin = NULL;
if (DelegateReference.IsSelfContext())
{
SelfPin = CreatePin(EGPD_Input, K2Schema->PC_Object, K2Schema->PSC_Self, NULL, false, false, K2Schema->PN_Self);
}
else
{
// Allow redirects on the target node if necessary.
DelegateReference.ResolveMember<UMulticastDelegateProperty>((UClass*)NULL);
SelfPin = CreatePin(EGPD_Input, K2Schema->PC_Object, TEXT(""), DelegateReference.GetMemberParentClass(this), false, false, K2Schema->PN_Self);
}
if(SelfPin)
{
SelfPin->PinFriendlyName = NSLOCTEXT("K2Node", "BaseMCDelegateSelfPinName", "Target").ToString();
}
}
示例8: CreatePin
void UK2Node_PlayMovieScene::AllocateDefaultPins()
{
const UEdGraphSchema_K2* K2Schema = GetDefault<UEdGraphSchema_K2>();
// Do not allow users to rename the node
// @todo sequencer: If we want to support renaming, this we'll need to update FNameValidatorFactory::MakeValidator() and perhaps other locations
bCanRenameNode = 0;
// "Play" starts or resumes playback from the current position
CreatePin( EGPD_Input, K2Schema->PC_Exec, TEXT(""), NULL, false, false, PlayMovieScenePinNames::Play );
// "Pause" stops playback, leaving the time cursor at its current position
CreatePin( EGPD_Input, K2Schema->PC_Exec, TEXT(""), NULL, false, false, PlayMovieScenePinNames::Pause );
// @todo sequencer: Add PlayFromStart?
// @todo sequencer: Add PlayReverse pin? PlayReverseFromEnd?
// @todo sequencer: Add "set time" input
// @todo sequencer: Needs output pin for "finished playing"
if( MovieSceneBindings != NULL )
{
for( auto BoundObjectIter( MovieSceneBindings->GetBoundObjects().CreateIterator() ); BoundObjectIter; ++BoundObjectIter )
{
auto& BoundObject = *BoundObjectIter;
CreatePinForBoundObject( BoundObject );
}
}
Super::AllocateDefaultPins();
}
示例9: SetEnum
void UK2Node_Select::AllocateDefaultPins()
{
const UEdGraphSchema_K2* Schema = GetDefault<UEdGraphSchema_K2>();
// To refresh, just in case it changed
SetEnum(Enum, true);
if (Enum)
{
NumOptionPins = EnumEntries.Num();
}
// Create the option pins
for (int32 Idx = 0; Idx < NumOptionPins; Idx++)
{
UEdGraphPin* NewPin = NULL;
if (Enum)
{
const FString PinName = EnumEntries[Idx].ToString();
UEdGraphPin* TempPin = FindPin(PinName);
if (!TempPin)
{
NewPin = CreatePin(EGPD_Input, Schema->PC_Wildcard, TEXT(""), NULL, false, false, PinName);
}
}
else
{
const FString PinName = FString::Printf(TEXT("Option %d"), Idx);
NewPin = CreatePin(EGPD_Input, Schema->PC_Wildcard, TEXT(""), NULL, false, false, PinName);
}
if (NewPin)
{
if (IndexPinType.PinCategory == UEdGraphSchema_K2::PC_Boolean)
{
NewPin->PinFriendlyName = (Idx == 0 ? GFalse : GTrue);
}
else if (Idx < EnumEntryFriendlyNames.Num())
{
if (EnumEntryFriendlyNames[Idx] != NAME_None)
{
NewPin->PinFriendlyName = FText::FromName(EnumEntryFriendlyNames[Idx]);
}
else
{
NewPin->PinFriendlyName = FText::GetEmpty();
}
}
}
}
// Create the index wildcard pin
CreatePin(EGPD_Input, IndexPinType.PinCategory, IndexPinType.PinSubCategory, IndexPinType.PinSubCategoryObject.Get(), false, false, "Index");
// Create the return value
CreatePin(EGPD_Output, Schema->PC_Wildcard, TEXT(""), NULL, false, false, Schema->PN_ReturnValue);
Super::AllocateDefaultPins();
}
示例10: switch
void UNiagaraNodeOutput::AllocateDefaultPins()
{
const UEdGraphSchema_Niagara* Schema = GetDefault<UEdGraphSchema_Niagara>();
for (const FNiagaraVariableInfo& Output : Outputs)
{
switch (Output.Type)
{
case ENiagaraDataType::Scalar:
{
CreatePin(EGPD_Input, Schema->PC_Float, TEXT(""), NULL, false, false, Output.Name.ToString());
}
break;
case ENiagaraDataType::Vector:
{
CreatePin(EGPD_Input, Schema->PC_Vector, TEXT(""), NULL, false, false, Output.Name.ToString());
}
break;
case ENiagaraDataType::Matrix:
{
CreatePin(EGPD_Input, Schema->PC_Matrix, TEXT(""), NULL, false, false, Output.Name.ToString());
}
break;
case ENiagaraDataType::Curve:
{
CreatePin(EGPD_Input, Schema->PC_Curve, TEXT(""), NULL, false, false, Output.Name.ToString());
}
break;
};
}
}
示例11: CreatePin
void UK2Node_CastByteToEnum::AllocateDefaultPins()
{
const UEdGraphSchema_K2* Schema = GetDefault<UEdGraphSchema_K2>();
CreatePin(EGPD_Input, Schema->PC_Byte, TEXT(""), NULL, false, false, ByteInputPinName);
CreatePin(EGPD_Output, Schema->PC_Byte, TEXT(""), Enum, false, false, Schema->PN_ReturnValue);
}
示例12: switch
void UNiagaraNodeInput::AllocateDefaultPins()
{
const UEdGraphSchema_Niagara* Schema = GetDefault<UEdGraphSchema_Niagara>();
switch (Input.Type)
{
case ENiagaraDataType::Scalar:
{
CreatePin(EGPD_Output, Schema->PC_Float, TEXT(""), NULL, false, false, TEXT("Input"));
}
break;
case ENiagaraDataType::Vector:
{
CreatePin(EGPD_Output, Schema->PC_Vector, TEXT(""), NULL, false, false, TEXT("Input"));
}
break;
case ENiagaraDataType::Matrix:
{
CreatePin(EGPD_Output, Schema->PC_Matrix, TEXT(""), NULL, false, false, TEXT("Input"));
}
break;
case ENiagaraDataType::Curve:
{
CreatePin(EGPD_Output, Schema->PC_Curve, TEXT(""), NULL, false, false, TEXT("Input"));
}
break;
};
}
示例13: CreatePin
void UEdGraphNode_Reference::AllocateDefaultPins()
{
ReferencerPin = CreatePin( EEdGraphPinDirection::EGPD_Input, TEXT(""), TEXT(""), NULL, false, false, TEXT("") );
DependencyPin = CreatePin( EEdGraphPinDirection::EGPD_Output, TEXT(""), TEXT(""), NULL, false, false, TEXT("") );
ReferencerPin->bHidden = true;
DependencyPin->bHidden = true;
}
示例14: CreatePin
void UK2Node_InputKey::AllocateDefaultPins()
{
const UEdGraphSchema_K2* K2Schema = GetDefault<UEdGraphSchema_K2>();
CreatePin(EGPD_Output, K2Schema->PC_Exec, TEXT(""), NULL, false, false, TEXT("Pressed"));
CreatePin(EGPD_Output, K2Schema->PC_Exec, TEXT(""), NULL, false, false, TEXT("Released"));
Super::AllocateDefaultPins();
}
示例15: check
void UK2Node_VariableGet::CreateNonPurePins(TArray<UEdGraphPin*>* InOldPinsPtr)
{
const UEdGraphSchema_K2* K2Schema = Cast<UEdGraphSchema_K2>(GetSchema());
check(K2Schema != nullptr);
if (!K2Schema->DoesGraphSupportImpureFunctions(GetGraph()))
{
bIsPureGet = true;
}
if (!bIsPureGet)
{
FEdGraphPinType PinType;
UProperty* VariableProperty = GetPropertyForVariable();
// We need the pin's type, to both see if it's an array and if it is of the correct types to remain an impure node
if (VariableProperty)
{
K2Schema->ConvertPropertyToPinType(GetPropertyForVariable(), PinType);
}
// If there is no property and we are given some old pins to look at, find the old value pin and use the type there
// This allows nodes to be pasted into other BPs without access to the property
else if(InOldPinsPtr)
{
// find old variable pin and use the type.
const FString PinName = GetVarNameString();
for(auto Iter = InOldPinsPtr->CreateConstIterator(); Iter; ++Iter)
{
if(const UEdGraphPin* Pin = *Iter)
{
if(PinName == Pin->PinName)
{
PinType = Pin->PinType;
break;
}
}
}
}
if (IsValidTypeForNonPure(PinType))
{
// Input - Execution Pin
CreatePin(EGPD_Input, K2Schema->PC_Exec, TEXT(""), NULL, false, false, K2Schema->PN_Execute);
// Output - Execution Pins
UEdGraphPin* ValidPin = CreatePin(EGPD_Output, K2Schema->PC_Exec, TEXT(""), NULL, false, false, K2Schema->PN_Then);
ValidPin->PinFriendlyName = LOCTEXT("Valid", "Is Valid");
UEdGraphPin* InvalidPin = CreatePin(EGPD_Output, K2Schema->PC_Exec, TEXT(""), NULL, false, false, K2Schema->PN_Else);
InvalidPin->PinFriendlyName = LOCTEXT("Invalid", "Is Not Valid");
}
else
{
bIsPureGet = true;
}
}
}