• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ FindPin函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中FindPin函数的典型用法代码示例。如果您正苦于以下问题:C++ FindPin函数的具体用法?C++ FindPin怎么用?C++ FindPin使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了FindPin函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: GetTargetFunction

void UK2Node_CallArrayFunction::GetArrayPins(TArray< FArrayPropertyPinCombo >& OutArrayPinInfo ) const
{
	OutArrayPinInfo.Empty();

	UFunction* TargetFunction = GetTargetFunction();
	check(TargetFunction);
	FString ArrayPointerMetaData = TargetFunction->GetMetaData(FBlueprintMetadata::MD_ArrayParam);
	TArray<FString> ArrayPinComboNames;
	ArrayPointerMetaData.ParseIntoArray(ArrayPinComboNames, TEXT(","), true);

	for(auto Iter = ArrayPinComboNames.CreateConstIterator(); Iter; ++Iter)
	{
		TArray<FString> ArrayPinNames;
		Iter->ParseIntoArray(ArrayPinNames, TEXT("|"), true);

		FArrayPropertyPinCombo ArrayInfo;
		ArrayInfo.ArrayPin = FindPin(ArrayPinNames[0]);
		if(ArrayPinNames.Num() > 1)
		{
			ArrayInfo.ArrayPropPin = FindPin(ArrayPinNames[1]);
		}

		if(ArrayInfo.ArrayPin)
		{
			OutArrayPinInfo.Add(ArrayInfo);
		}
	}
}
开发者ID:PickUpSU,项目名称:UnrealEngine4,代码行数:28,代码来源:K2Node_CallArrayFunction.cpp


示例2: GetBlueprint

void UK2Node_Timeline::ExpandNode(FKismetCompilerContext& CompilerContext, UEdGraph* SourceGraph)
{
	Super::ExpandNode(CompilerContext, SourceGraph);

	const UEdGraphSchema_K2* K2Schema = GetDefault<UEdGraphSchema_K2>();
	UBlueprint* Blueprint = GetBlueprint();
	check(Blueprint);

	UTimelineTemplate* Timeline = Blueprint->FindTimelineTemplateByVariableName(TimelineName);
	if(Timeline)
	{
		ExpandForPin(GetDirectionPin(), Timeline->GetDirectionPropertyName(), CompilerContext, SourceGraph);

		for(int32 i=0; i<Timeline->FloatTracks.Num(); i++)
		{
			const FName TrackName = Timeline->FloatTracks[i].TrackName;
			ExpandForPin(FindPin(TrackName.ToString()), Timeline->GetTrackPropertyName(TrackName), CompilerContext, SourceGraph);
		}

		for(int32 i=0; i<Timeline->VectorTracks.Num(); i++)
		{
			const FName TrackName = Timeline->VectorTracks[i].TrackName;
			ExpandForPin(FindPin(TrackName.ToString()), Timeline->GetTrackPropertyName(TrackName), CompilerContext, SourceGraph);
		}

		for(int32 i=0; i<Timeline->LinearColorTracks.Num(); i++)
		{
			const FName TrackName = Timeline->LinearColorTracks[i].TrackName;
			ExpandForPin(FindPin(TrackName.ToString()), Timeline->GetTrackPropertyName(TrackName), CompilerContext, SourceGraph);
		}
	}
}
开发者ID:Codermay,项目名称:Unreal4,代码行数:32,代码来源:K2Node_Timeline.cpp


示例3: GetDelegateSignature

void UK2Node_DelegateSet::ExpandNode(class FKismetCompilerContext& CompilerContext, UEdGraph* SourceGraph)
{
	Super::ExpandNode(CompilerContext, SourceGraph);

	if (SourceGraph != CompilerContext.ConsolidatedEventGraph)
	{
		CompilerContext.MessageLog.Error(*FString::Printf(*NSLOCTEXT("KismetCompiler", "InvalidNodeOutsideUbergraph_Error", "Unexpected node @@ found outside ubergraph.").ToString()), this);
	}
	else
	{
		UFunction* TargetFunction = GetDelegateSignature();
		if(TargetFunction != NULL)
		{
			const UEdGraphSchema_K2* Schema = CompilerContext.GetSchema();

			// First, create an event node matching the delegate signature
			UK2Node_Event* DelegateEvent = CompilerContext.SpawnIntermediateEventNode<UK2Node_Event>(this, nullptr, SourceGraph);
			DelegateEvent->EventReference.SetFromField<UFunction>(TargetFunction, false);
			DelegateEvent->CustomFunctionName = GetDelegateTargetEntryPointName();
			DelegateEvent->bInternalEvent = true;
			DelegateEvent->AllocateDefaultPins();

			// Move the pins over to the newly created event node
			for( TArray<UEdGraphPin*>::TIterator PinIt(DelegateEvent->Pins); PinIt; ++PinIt )
			{
				UEdGraphPin* CurrentPin = *PinIt;
				check(CurrentPin);

				if( CurrentPin->Direction == EGPD_Output )
				{
					if( CurrentPin->PinType.PinCategory == Schema->PC_Exec )
					{
						// Hook up the exec pin specially, since it has a different name on the dynamic delegate node
						UEdGraphPin* OldExecPin = FindPin(Schema->PN_DelegateEntry);
						check(OldExecPin);
						CompilerContext.MovePinLinksToIntermediate(*OldExecPin, *CurrentPin);
					}
					else if( CurrentPin->PinName != UK2Node_Event::DelegateOutputName )
					{
						// Hook up all other pins, EXCEPT the delegate output pin, which isn't needed in this case
						UEdGraphPin* OldPin = FindPin(CurrentPin->PinName);
						if( !OldPin )
						{
							// If we couldn't find the old pin, the function signature is out of date.  Tell them to reconstruct
							CompilerContext.MessageLog.Error(*FString::Printf(*NSLOCTEXT("KismetCompiler", "EventNodeOutOfDate_Error", "Event node @@ is out-of-date.  Please refresh it.").ToString()), this);
							return;
						}

						CompilerContext.MovePinLinksToIntermediate(*OldPin, *CurrentPin);
					}
				}
			}
		}
		else
		{
			CompilerContext.MessageLog.Error(*FString::Printf(*LOCTEXT("DelegateSigNotFound_Error", "Set Delegate node @@ unable to find function.").ToString()), this);
		}
	}
}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:59,代码来源:K2Node_DelegateSet.cpp


示例4: FindPinChecked

void UK2Node_EaseFunction::ExpandNode(class FKismetCompilerContext& CompilerContext, UEdGraph* SourceGraph)
{
	Super::ExpandNode(CompilerContext, SourceGraph);

	/**
		At the end of this, the UK2Node_EaseFunction will not be a part of the Blueprint, it merely handles connecting
		the other nodes into the Blueprint.
	*/

	UFunction* Function = UKismetMathLibrary::StaticClass()->FindFunctionByName(*EaseFunctionName);
	if (Function == NULL)
	{
		CompilerContext.MessageLog.Error(*LOCTEXT("InvalidFunctionName", "BaseAsyncTask: Type not supported or not initialized. @@").ToString(), this);
		return;
	}

	const UEdGraphSchema_K2* Schema = CompilerContext.GetSchema();

	// The call function does all the real work, each child class implementing easing for  a given type provides
	// the name of the desired function
	UK2Node_CallFunction* CallFunction = CompilerContext.SpawnIntermediateNode<UK2Node_CallFunction>(this, SourceGraph);
		
	CallFunction->SetFromFunction(Function);
	CallFunction->AllocateDefaultPins();
	CompilerContext.MessageLog.NotifyIntermediateObjectCreation(CallFunction, this);

	// Move the ease function and the alpha connections from us to the call function
	CompilerContext.MovePinLinksToIntermediate(*FindPin(FEaseFunctionNodeHelper::GetEaseFuncPinName()), *CallFunction->FindPin(TEXT("EasingFunc")));
	CompilerContext.MovePinLinksToIntermediate(*FindPin(FEaseFunctionNodeHelper::GetAlphaPinName()), *CallFunction->FindPin(TEXT("Alpha")));

	// Move base connections to the call function's connections
	CompilerContext.MovePinLinksToIntermediate(*FindPin(FEaseFunctionNodeHelper::GetAPinName()), *CallFunction->FindPin(TEXT("A")));
	CompilerContext.MovePinLinksToIntermediate(*FindPin(FEaseFunctionNodeHelper::GetBPinName()), *CallFunction->FindPin(TEXT("B")));
	CompilerContext.MovePinLinksToIntermediate(*FindPin(FEaseFunctionNodeHelper::GetResultPinName()), *CallFunction->GetReturnValuePin());

	// Now move the custom pins to their new locations
	UEdGraphPin* ShortestPathPin = FindPinChecked(FEaseFunctionNodeHelper::GetShortestPathPinName());
	if (!ShortestPathPin->bHidden)
	{
		CompilerContext.MovePinLinksToIntermediate(*ShortestPathPin, *CallFunction->FindPinChecked(TEXT("bShortestPath")));
	}

	UEdGraphPin* BlendExpPin = FindPinChecked(FEaseFunctionNodeHelper::GetBlendExpPinName());
	if (!BlendExpPin->bHidden)
	{
		CompilerContext.MovePinLinksToIntermediate(*BlendExpPin, *CallFunction->FindPinChecked(FEaseFunctionNodeHelper::GetBlendExpPinName()));
	}

	UEdGraphPin* StepsPin = FindPinChecked(FEaseFunctionNodeHelper::GetStepsPinName());
	if (!StepsPin->bHidden)
	{
		CompilerContext.MovePinLinksToIntermediate(*StepsPin, *CallFunction->FindPinChecked(FEaseFunctionNodeHelper::GetStepsPinName()));
	}

	// Cleanup links to ourself and we are done!
	BreakAllNodeLinks();
}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:57,代码来源:K2Node_EaseFunction.cpp


示例5: FindPin

void UGameplayTagsK2Node_MultiCompareGameplayTagContainerSingleTags::ExpandNode(class FKismetCompilerContext& CompilerContext, UEdGraph* SourceGraph)
{
	Super::ExpandNode(CompilerContext, SourceGraph);

	const UEdGraphSchema_K2* K2Schema = GetDefault<UEdGraphSchema_K2>();

	// Get The input and output pins to our node
	UEdGraphPin* InPinSwitch = FindPin(TEXT("Gameplay Tag Container"));
	UEdGraphPin* InPinContainerMatchType = FindPin(TEXT("Tag Container Match Type"));
	UEdGraphPin* InPinTagsMatchType = FindPin(TEXT("Tags Match Type"));

	// For Each Pin Compare against the Tag container
	for (int32 Index = 0; Index < NumberOfPins; ++Index)
	{
		FString InPinName = TEXT("TagCase_") + FString::FormatAsNumber(Index);
		FString OutPinName = TEXT("Case_") + FString::FormatAsNumber(Index) + TEXT(" True");
		UEdGraphPin* InPinCase = FindPin(InPinName);
		UEdGraphPin* OutPinCase = FindPin(OutPinName);

		// Create call function node for the Compare function HasAllMatchingGameplayTags
		UK2Node_CallFunction* PinCallFunction = CompilerContext.SpawnIntermediateNode<UK2Node_CallFunction>(this, SourceGraph);
		const UFunction* Function = UBlueprintGameplayTagLibrary::StaticClass()->FindFunctionByName(GET_FUNCTION_NAME_CHECKED(UBlueprintGameplayTagLibrary, DoesContainerHaveTag));
		PinCallFunction->SetFromFunction(Function);
		PinCallFunction->AllocateDefaultPins();

		UEdGraphPin *TagContainerPin = PinCallFunction->FindPinChecked(FString(TEXT("TagContainer")));
		CompilerContext.CopyPinLinksToIntermediate(*InPinSwitch, *TagContainerPin);

		UEdGraphPin *TagPin = PinCallFunction->FindPinChecked(FString(TEXT("Tag")));
		CompilerContext.MovePinLinksToIntermediate(*InPinCase, *TagPin);

		UEdGraphPin *ContainerTagsMatchTypePin = PinCallFunction->FindPinChecked(FString(TEXT("ContainerTagsMatchType")));
		CompilerContext.CopyPinLinksToIntermediate(*InPinContainerMatchType, *ContainerTagsMatchTypePin);

		UEdGraphPin *TagMatchTypePin = PinCallFunction->FindPinChecked(FString(TEXT("TagMatchType")));
		CompilerContext.CopyPinLinksToIntermediate(*InPinTagsMatchType, *TagMatchTypePin);
		
		UEdGraphPin *OutPin = PinCallFunction->FindPinChecked(K2Schema->PN_ReturnValue);

		if (OutPinCase && OutPin)
		{
			OutPin->PinType = OutPinCase->PinType; // Copy type so it uses the right actor subclass
			CompilerContext.MovePinLinksToIntermediate(*OutPinCase, *OutPin);
		}
	}

	// Break any links to the expanded node
	BreakAllNodeLinks();
}
开发者ID:JustDo1989,项目名称:UnrealEngine4.11-HairWorks,代码行数:49,代码来源:GameplayTagsK2Node_MultiCompareGameplayTagContainerSingleTags.cpp


示例6: while

HRESULT CSampleCGB::FindEncoder( IEnumMoniker *pEncoders, REGPINMEDIUM pinMedium, IBaseFilter **ppEncoder )
{
	if( ! pEncoders )
	{
		return E_INVALIDARG;
	}

	if(IsEqualGUID(pinMedium.clsMedium,GUID_NULL) || IsEqualGUID(pinMedium.clsMedium,KSMEDIUMSETID_Standard))
	{
		return E_INVALIDARG;
	}

	HRESULT hr;
	SmartPtr<IBaseFilter> pFilter;
	SmartPtr<IMoniker>   pMoniker;
	ULONG cFetched;
	SmartPtr<IPin> pPin;

	while(pFilter.Release(),pMoniker.Release(),S_OK == pEncoders->Next(1,&pMoniker,&cFetched))
	{
		hr = pMoniker->BindToObject(0,0,IID_IBaseFilter,(void**)&pFilter);
		if(FAILED(hr))continue;

		hr = FindPin(pFilter,pinMedium,PINDIR_INPUT,TRUE,&pPin);
		if(SUCCEEDED(hr))
		{
			*ppEncoder = pFilter.Detach();
			return hr;
		}
	}
	return E_FAIL;
}
开发者ID:Forlearngit,项目名称:VisitorManager,代码行数:32,代码来源:SampleCGB.cpp


示例7: 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;
	}
}
开发者ID:frobro98,项目名称:UnrealSource,代码行数:33,代码来源:K2Node_FunctionEntry.cpp


示例8: FindPin

void UK2Node_Event::ExpandNode(class FKismetCompilerContext& CompilerContext, UEdGraph* SourceGraph)
{
	Super::ExpandNode(CompilerContext, SourceGraph);

	if (CompilerContext.bIsFullCompile)
	{
		UEdGraphPin* OrgDelegatePin = FindPin(UK2Node_Event::DelegateOutputName);
		if (OrgDelegatePin && OrgDelegatePin->LinkedTo.Num() > 0)
		{
			const UEdGraphSchema_K2* Schema = CompilerContext.GetSchema();

			const FName FunctionName = GetFunctionName();
			if(FunctionName == NAME_None)
			{
				CompilerContext.MessageLog.Error(*FString::Printf(*LOCTEXT("EventDelegateName_Error", "Event node @@ has no name of function.").ToString()), this);
			}

			UK2Node_Self* SelfNode = CompilerContext.SpawnIntermediateNode<UK2Node_Self>(this, SourceGraph);
			SelfNode->AllocateDefaultPins();

			UK2Node_CreateDelegate* CreateDelegateNode = CompilerContext.SpawnIntermediateNode<UK2Node_CreateDelegate>(this, SourceGraph);
			CreateDelegateNode->AllocateDefaultPins();
			CompilerContext.MovePinLinksToIntermediate(*OrgDelegatePin, *CreateDelegateNode->GetDelegateOutPin());
			Schema->TryCreateConnection(SelfNode->FindPinChecked(Schema->PN_Self), CreateDelegateNode->GetObjectInPin());
			// When called UFunction is defined in the same class, it wasn't created yet (previously the Skeletal class was checked). So no "CreateDelegateNode->HandleAnyChangeWithoutNotifying();" is called.
			CreateDelegateNode->SetFunction(FunctionName);
		}
	}
}
开发者ID:1vanK,项目名称:AHRUnrealEngine,代码行数:29,代码来源:K2Node_Event.cpp


示例9: FindPin

void UAnimGraphNode_PoseByName::ValidateAnimNodeDuringCompilation(class USkeleton* ForSkeleton, class FCompilerResultsLog& MessageLog)
{
	UPoseAsset* PoseAssetToCheck = Node.PoseAsset;
	UEdGraphPin* PoseAssetPin = FindPin(GET_MEMBER_NAME_STRING_CHECKED(FAnimNode_PoseByName, PoseAsset));
	if (PoseAssetPin != nullptr && PoseAssetToCheck == nullptr)
	{
		PoseAssetToCheck = Cast<UPoseAsset>(PoseAssetPin->DefaultObject);
	}

	if (PoseAssetToCheck == nullptr)
	{
		// we may have a connected node
		if (PoseAssetPin == nullptr || PoseAssetPin->LinkedTo.Num() == 0)
		{
			MessageLog.Error(TEXT("@@ references an unknown pose asset"), this);
		}
	}
	else
	{
		USkeleton* SeqSkeleton = PoseAssetToCheck->GetSkeleton();
		if (SeqSkeleton&& // if anim sequence doesn't have skeleton, it might be due to anim sequence not loaded yet, @todo: wait with anim blueprint compilation until all assets are loaded?
			!SeqSkeleton->IsCompatible(ForSkeleton))
		{
			MessageLog.Error(TEXT("@@ references sequence that uses different skeleton @@"), this, SeqSkeleton);
		}
	}
}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:27,代码来源:AnimGraphNode_PoseByName.cpp


示例10: FindPin

UEdGraphPin* UK2Node_DynamicCast::GetBoolSuccessPin() const
{
	UEdGraphPin* Pin = FindPin(UK2Node_DynamicCastImpl::CastSuccessPinName);
	check(Pin != nullptr);
	check(Pin->Direction == EGPD_Output);
	return Pin;
}
开发者ID:Codermay,项目名称:Unreal4,代码行数:7,代码来源:K2Node_DynamicCast.cpp


示例11: 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();
}
开发者ID:johndpope,项目名称:UE4,代码行数:60,代码来源:K2Node_Select.cpp


示例12: GetSchema

bool UK2Node_EditablePinBase::ModifyUserDefinedPinDefaultValue(TSharedPtr<FUserPinInfo> PinInfo, const FString& InDefaultValue)
{
	FString NewDefaultValue = InDefaultValue;

	// Find and modify the current pin
	if (UEdGraphPin* OldPin = FindPin(PinInfo->PinName))
	{
		FString SavedDefaultValue = OldPin->DefaultValue;
		OldPin->DefaultValue = OldPin->AutogeneratedDefaultValue = NewDefaultValue;

		// Validate the new default value
		const UEdGraphSchema* Schema = GetSchema();
		FString ErrorString = Schema->IsCurrentPinDefaultValid(OldPin);

		if (!ErrorString.IsEmpty())
		{
			NewDefaultValue = SavedDefaultValue;
			OldPin->DefaultValue = OldPin->AutogeneratedDefaultValue = SavedDefaultValue;

			return false;
		}
	}

	PinInfo->PinDefaultValue = NewDefaultValue;
	return true;
}
开发者ID:Tigrouzen,项目名称:UnrealEngine-4,代码行数:26,代码来源:K2Node_EditablePinBase.cpp


示例13: GetPoseHandlerNode

void UAnimGraphNode_PoseHandler::ValidateAnimNodeDuringCompilation(USkeleton* ForSkeleton, FCompilerResultsLog& MessageLog)
{
	UPoseAsset* PoseAssetToCheck = GetPoseHandlerNode()->PoseAsset;
	UEdGraphPin* PoseAssetPin = FindPin(GET_MEMBER_NAME_STRING_CHECKED(FAnimNode_PoseHandler, PoseAsset));
	if (PoseAssetPin != nullptr && PoseAssetToCheck == nullptr)
	{
		PoseAssetToCheck = Cast<UPoseAsset>(PoseAssetPin->DefaultObject);
	}

	if (PoseAssetToCheck == nullptr)
	{
		if (PoseAssetPin == nullptr || PoseAssetPin->LinkedTo.Num() == 0)
		{
			MessageLog.Error(TEXT("@@ references an unknown poseasset"), this);
		}
	}
	else
	{
		USkeleton* SeqSkeleton = PoseAssetToCheck->GetSkeleton();
		if (SeqSkeleton && // if PoseAsset doesn't have skeleton, it might be due to PoseAsset not loaded yet, @todo: wait with anim blueprint compilation until all assets are loaded?
			!SeqSkeleton->IsCompatible(ForSkeleton))
		{
			MessageLog.Error(TEXT("@@ references poseasset that uses different skeleton @@"), this, SeqSkeleton);
		}
	}

	Super::ValidateAnimNodeDuringCompilation(ForSkeleton, MessageLog);
}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:28,代码来源:AnimGraphNode_PoseHandler.cpp


示例14: FindPin

void UK2Node_ConvertAsset::RefreshPinTypes()
{
	const UEdGraphSchema_K2* K2Schema = CastChecked<UEdGraphSchema_K2>(GetSchema());
	auto InutPin = FindPin(UK2Node_ConvertAssetImpl::InputPinName);
	auto OutputPin = FindPin(UK2Node_ConvertAssetImpl::OutputPinName);
	ensure(InutPin && OutputPin);
	if (InutPin && OutputPin)
	{
		const bool bIsConnected = InutPin->LinkedTo.Num() > 0;
		UClass* TargetType = bIsConnected ? GetTargetClass() : nullptr;
		const bool bIsAssetClass = bIsConnected ? IsAssetClassType() : false;

		const FString InputCategory = bIsConnected
			? (bIsAssetClass ? K2Schema->PC_AssetClass : K2Schema->PC_Asset)
			: K2Schema->PC_Wildcard;
		InutPin->PinType = FEdGraphPinType(InputCategory, FString(), TargetType, false, false);

		const FString OutputCategory = bIsConnected
			? (bIsAssetClass ? K2Schema->PC_Class : K2Schema->PC_Object)
			: K2Schema->PC_Wildcard;
		OutputPin->PinType = FEdGraphPinType(OutputCategory, FString(), TargetType, false, false);

		PinTypeChanged(InutPin);
		PinTypeChanged(OutputPin);

		if (OutputPin->LinkedTo.Num())
		{
			UClass const* CallingContext = NULL;
			if (UBlueprint const* Blueprint = GetBlueprint())
			{
				CallingContext = Blueprint->GeneratedClass;
				if (CallingContext == NULL)
				{
					CallingContext = Blueprint->ParentClass;
				}
			}

			for (auto TargetPin : OutputPin->LinkedTo)
			{
				if (TargetPin && !K2Schema->ArePinsCompatible(OutputPin, TargetPin, CallingContext))
				{
					OutputPin->BreakLinkTo(TargetPin);
				}
			}
		}
	}
}
开发者ID:JustDo1989,项目名称:UnrealEngine4.11-HairWorks,代码行数:47,代码来源:K2Node_ConvertAsset.cpp


示例15: FindPin

UEdGraphPin* UK2Node_IfThenElse::GetConditionPin() const
{
	const UEdGraphSchema_K2* K2Schema = GetDefault<UEdGraphSchema_K2>();

	UEdGraphPin* Pin = FindPin(K2Schema->PN_Condition);
	check(Pin != NULL);
	return Pin;
}
开发者ID:Codermay,项目名称:Unreal4,代码行数:8,代码来源:K2Node_IfThenElse.cpp


示例16: FindPin

UEdGraphPin* UK2Node::GetExecPin() const
{
	const UEdGraphSchema_K2* K2Schema = GetDefault<UEdGraphSchema_K2>();

	UEdGraphPin* Pin = FindPin(K2Schema->PN_Execute);
	check(Pin == NULL || Pin->Direction == EGPD_Input); // If pin exists, it must be input
	return Pin;
}
开发者ID:mysheng8,项目名称:UnrealEngine,代码行数:8,代码来源:K2Node.cpp


示例17: FindPin

UEdGraphPin* UK2Node_EnumEquality::GetInput2Pin() const
{
	const UEdGraphSchema_K2* K2Schema = GetDefault<UEdGraphSchema_K2>();

	UEdGraphPin* Pin = FindPin("B");
	check(Pin != NULL);
	return Pin;
}
开发者ID:JustDo1989,项目名称:UnrealEngine4.11-HairWorks,代码行数:8,代码来源:K2Node_EnumEquality.cpp


示例18: FindPin

UEdGraphPin* UK2Node_Select::GetReturnValuePin() const
{
	const UEdGraphSchema_K2* K2Schema = GetDefault<UEdGraphSchema_K2>();

	UEdGraphPin* Pin = FindPin(K2Schema->PN_ReturnValue);
	check(Pin != NULL);
	return Pin;
}
开发者ID:johndpope,项目名称:UE4,代码行数:8,代码来源:K2Node_Select.cpp


示例19: GetRelativeTransformPin

void UK2Node_AddComponent::ExpandNode(class FKismetCompilerContext& CompilerContext, UEdGraph* SourceGraph)
{
	Super::ExpandNode(CompilerContext, SourceGraph);

	auto TransformPin = GetRelativeTransformPin();
	if (TransformPin && !TransformPin->LinkedTo.Num())
	{
		FString DefaultValue;

		// Try and find the template and get relative transform from it
		UEdGraphPin* TemplateNamePin = GetTemplateNamePinChecked();
		const FString TemplateName = TemplateNamePin->DefaultValue;
		check(CompilerContext.Blueprint);
		USceneComponent* SceneCompTemplate = Cast<USceneComponent>(CompilerContext.Blueprint->FindTemplateByName(FName(*TemplateName)));
		if (SceneCompTemplate)
		{
			FTransform TemplateTransform = FTransform(SceneCompTemplate->RelativeRotation, SceneCompTemplate->RelativeLocation, SceneCompTemplate->RelativeScale3D);
			DefaultValue = TemplateTransform.ToString();
		}

		auto ValuePin = InnerHandleAutoCreateRef(this, TransformPin, CompilerContext, SourceGraph, !DefaultValue.IsEmpty());
		if (ValuePin)
		{
			ValuePin->DefaultValue = DefaultValue;
		}
	}

	if (bHasExposedVariable)
	{
		static FString ObjectParamName = FString(TEXT("Object"));
		static FString ValueParamName = FString(TEXT("Value"));
		static FString PropertyNameParamName = FString(TEXT("PropertyName"));

		UK2Node_AddComponent* NewNode = CompilerContext.SpawnIntermediateNode<UK2Node_AddComponent>(this, SourceGraph); 
		NewNode->SetFromFunction(GetTargetFunction());
		NewNode->AllocateDefaultPinsWithoutExposedVariables();

		// function parameters
		const UEdGraphSchema_K2* K2Schema = GetDefault<UEdGraphSchema_K2>();
		CompilerContext.MovePinLinksToIntermediate(*FindPin(K2Schema->PN_Self), *NewNode->FindPin(K2Schema->PN_Self));
		CompilerContext.MovePinLinksToIntermediate(*GetTemplateNamePinChecked(), *NewNode->GetTemplateNamePinChecked());
		CompilerContext.MovePinLinksToIntermediate(*GetRelativeTransformPin(), *NewNode->GetRelativeTransformPin());
		CompilerContext.MovePinLinksToIntermediate(*GetManualAttachmentPin(), *NewNode->GetManualAttachmentPin());

		UEdGraphPin* ReturnPin = NewNode->GetReturnValuePin();
		UEdGraphPin* OriginalReturnPin = GetReturnValuePin();
		check((NULL != ReturnPin) && (NULL != OriginalReturnPin));
		ReturnPin->PinType = OriginalReturnPin->PinType;
		CompilerContext.MovePinLinksToIntermediate(*OriginalReturnPin, *ReturnPin);
		// exec in
		CompilerContext.MovePinLinksToIntermediate(*GetExecPin(), *NewNode->GetExecPin());

		UEdGraphPin* LastThen = FKismetCompilerUtilities::GenerateAssignmentNodes( CompilerContext, SourceGraph, NewNode, this, ReturnPin, GetSpawnedType() );

		CompilerContext.MovePinLinksToIntermediate(*GetThenPin(), *LastThen);
		BreakAllNodeLinks();
	}
}
开发者ID:RandomDeveloperM,项目名称:UE4_Hairworks,代码行数:58,代码来源:K2Node_AddComponent.cpp


示例20: ConnectPins

bool ConnectPins(IGraphBuilder *filterGraph, IBaseFilter* outputFilter, unsigned int outputNum, IBaseFilter* inputFilter, unsigned int inputNum) 
{
    IPin *inputPin = 0;
    IPin *outputPin = 0;

    if (!outputFilter || !inputFilter) {
        return false;
    }

    FindPin(outputFilter, PINDIR_OUTPUT, outputNum, &outputPin);
    FindPin(inputFilter, PINDIR_INPUT, inputNum, &inputPin);

	bool ret = false;
    if (inputPin && outputPin) 
	{
		IPin *tmp = 0;
		outputPin->ConnectedTo (&tmp);
		if (tmp)
		{
			outputPin->Disconnect ();
			tmp->Release();
		}
		inputPin->ConnectedTo (&tmp);
		if (tmp)
		{
			inputPin->Disconnect ();
			tmp->Release();
		}

		HRESULT hr = filterGraph->Connect (outputPin, inputPin);
        ret = SUCCEEDED(hr);
	}

	if (inputPin)
	{
		inputPin->Release();
	}

	if (outputPin)
	{
		outputPin->Release();
	}

	return ret;
}
开发者ID:gaoyakun,项目名称:atom3d,代码行数:45,代码来源:dshow_movieplayer.cpp



注:本文中的FindPin函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ FindRes函数代码示例发布时间:2022-05-30
下一篇:
C++ FindPath函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap