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

C++ GetBlueprint函数代码示例

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

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



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

示例1: GetBlueprint

void UAnimGraphNode_StateMachineBase::DestroyNode()
{
	UEdGraph* GraphToRemove = EditorStateMachineGraph;

	EditorStateMachineGraph = NULL;
	Super::DestroyNode();

	if (GraphToRemove)
	{
		UBlueprint* Blueprint = GetBlueprint();
		GraphToRemove->Modify();
		FBlueprintEditorUtils::RemoveGraph(Blueprint, GraphToRemove, EGraphRemoveFlags::Recompile);
	}
}
开发者ID:1vanK,项目名称:AHRUnrealEngine,代码行数:14,代码来源:AnimGraphNode_StateMachineBase.cpp


示例2: GetBlueprint

bool UK2Node_MacroInstance::HasExternalDependencies(TArray<class UStruct*>* OptionalOutput) const
{
	UBlueprint* OtherBlueprint = MacroGraphReference.GetBlueprint();
	const bool bResult = OtherBlueprint && (OtherBlueprint != GetBlueprint());
	if (bResult && OptionalOutput)
	{
		if (UClass* OtherClass = *OtherBlueprint->GeneratedClass)
		{
			OptionalOutput->AddUnique(OtherClass);
		}
	}
	const bool bSuperResult = Super::HasExternalDependencies(OptionalOutput);
	return bSuperResult || bResult;
}
开发者ID:ErwinT6,项目名称:T6Engine,代码行数:14,代码来源:K2Node_MacroInstance.cpp


示例3: Battle

ShipBattle::ShipBattle(const Hex& hex, const Game& game, const GroupVec& oldGroups) : Battle(hex, game, oldGroups)
{
	VERIFY_MODEL(m_groups.size() >= 2);

	bool missiles = false;
	for (auto& group : m_groups)
	{
		group.hasMissiles = GetBlueprint(game, group.shipType, group.invader).HasMissiles();
		missiles |= group.hasMissiles;
	}

	m_turn.groupIndex = missiles ? FindFirstMissileGroup() : 0;
	m_turn.phase = missiles ? BattlePhase::Missile : BattlePhase::Main;
}
开发者ID:molip,项目名称:Eclipsoid,代码行数:14,代码来源:ShipBattle.cpp


示例4: GetBlueprint

USCS_Node* USimpleConstructionScript::CreateNode(UClass* NewComponentClass, FName NewComponentVariableName)
{
	UBlueprint* Blueprint = GetBlueprint();
	check(Blueprint);
	check(NewComponentClass->IsChildOf(UActorComponent::StaticClass()));
	ensure(Cast<UBlueprintGeneratedClass>(Blueprint->GeneratedClass));

	// note that naming logic is duplicated in CreateNodeAndRenameComponent:
	NewComponentVariableName = GenerateNewComponentName(NewComponentClass, NewComponentVariableName);

	UActorComponent* NewComponentTemplate = NewObject<UActorComponent>(Blueprint->GeneratedClass, NewComponentClass, *(NewComponentVariableName.GetPlainNameString() + FGuid::NewGuid().ToString() ), RF_ArchetypeObject|RF_Transactional|RF_Public);

	return CreateNodeImpl(NewComponentTemplate, NewComponentVariableName);
}
开发者ID:johndpope,项目名称:UE4,代码行数:14,代码来源:SimpleConstructionScript.cpp


示例5: GetBlueprint

UActorComponent* UK2Node_AddComponent::GetTemplateFromNode() const
{
	UBlueprint* BlueprintObj = GetBlueprint();

	// Find the template name input pin, to get the name from
	UEdGraphPin* TemplateNamePin = GetTemplateNamePin();
	if (TemplateNamePin)
	{
		const FString& TemplateName = TemplateNamePin->DefaultValue;
		return BlueprintObj->FindTemplateByName(FName(*TemplateName));
	}

	return NULL;
}
开发者ID:RandomDeveloperM,项目名称:UE4_Hairworks,代码行数:14,代码来源:K2Node_AddComponent.cpp


示例6: GetBlueprint

bool UK2Node_CallFunctionOnMember::HasExternalDependencies(TArray<class UStruct*>* OptionalOutput) const
{
	const UBlueprint* SourceBlueprint = GetBlueprint();

	auto VarProperty = MemberVariableToCallOn.ResolveMember<UProperty>(GetBlueprintClassFromNode());
	UClass* SourceClass = VarProperty ? VarProperty->GetOwnerClass() : nullptr;
	const bool bResult = (SourceClass != NULL) && (SourceClass->ClassGeneratedBy != SourceBlueprint);
	if (bResult && OptionalOutput)
	{
		OptionalOutput->AddUnique(SourceClass);
	}

	const bool bSuperResult = Super::HasExternalDependencies(OptionalOutput);
	return bSuperResult || bResult;
}
开发者ID:PickUpSU,项目名称:UnrealEngine4,代码行数:15,代码来源:K2Node_CallFunctionOnMember.cpp


示例7: GetBlueprint

void UK2Node_Timeline::DestroyNode()
{
	UBlueprint* Blueprint = GetBlueprint();
	check(Blueprint);
	UTimelineTemplate* Timeline = Blueprint->FindTimelineTemplateByVariableName(TimelineName);
	if(Timeline)
	{
		FBlueprintEditorUtils::RemoveTimeline(Blueprint, Timeline, true);

		// Move template object out of the way so that we can potentially create a timeline with the same name either through a paste or a new timeline action
		Timeline->Rename(NULL, GetTransientPackage(), (Blueprint->bIsRegeneratingOnLoad ? REN_ForceNoResetLoaders : REN_None));
	}

	Super::DestroyNode();
}
开发者ID:Codermay,项目名称:Unreal4,代码行数:15,代码来源:K2Node_Timeline.cpp


示例8: GetOutputPin

void UK2Node_MakeArray::PropagatePinType()
{
	const UEdGraphPin* OutputPin = GetOutputPin();

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

		const UEdGraphSchema_K2* Schema = GetDefault<UEdGraphSchema_K2>();
		bool bWantRefresh = false;
		// Propagate pin type info (except for array info!) to pins with dependent types
		for (TArray<UEdGraphPin*>::TIterator it(Pins); it; ++it)
		{
			UEdGraphPin* CurrentPin = *it;

			if (CurrentPin != OutputPin)
			{
				bWantRefresh = true;
				CurrentPin->PinType.PinCategory = OutputPin->PinType.PinCategory;
				CurrentPin->PinType.PinSubCategory = OutputPin->PinType.PinSubCategory;
				CurrentPin->PinType.PinSubCategoryObject = OutputPin->PinType.PinSubCategoryObject;

				// Verify that all previous connections to this pin are still valid with the new type
				for (TArray<UEdGraphPin*>::TIterator ConnectionIt(CurrentPin->LinkedTo); ConnectionIt; ++ConnectionIt)
				{
					UEdGraphPin* ConnectedPin = *ConnectionIt;
					if (!Schema->ArePinsCompatible(CurrentPin, ConnectedPin, CallingContext))
					{
						CurrentPin->BreakLinkTo(ConnectedPin);
					}
				}
			}
		}
		// If we have a valid graph we should refresh it now to refelect any changes we made
		if( (bWantRefresh == true ) && ( OutputPin->GetOwningNode() != NULL ) && ( OutputPin->GetOwningNode()->GetGraph() != NULL ) )
		{
			OutputPin->GetOwningNode()->GetGraph()->NotifyGraphChanged();
		}
	}
}
开发者ID:1vanK,项目名称:AHRUnrealEngine,代码行数:48,代码来源:K2Node_MakeArray.cpp


示例9: GetBlueprint

uint32 UK2Node_CustomEvent::GetNetFlags() const
{
	uint32 NetFlags = (FunctionFlags & FUNC_NetFuncFlags);
	if (IsOverride())
	{
		UBlueprint* Blueprint = GetBlueprint();
		check(Blueprint != NULL);

		UFunction* ParentFunction = FindField<UFunction>(Blueprint->ParentClass, CustomFunctionName);
		check(ParentFunction != NULL);

		// inherited net flags take precedence 
		NetFlags = (ParentFunction->FunctionFlags & FUNC_NetFuncFlags);
	}
	return NetFlags;
}
开发者ID:Codermay,项目名称:Unreal4,代码行数:16,代码来源:K2Node_CustomEvent.cpp


示例10: GetTemplateFromNode

void UK2Node_AddComponent::DestroyNode()
{
	// See if this node has a template
	UActorComponent* Template = GetTemplateFromNode();
	if (Template != NULL)
	{
		// Get the blueprint so we can remove it from it
		UBlueprint* BlueprintObj = GetBlueprint();

		// remove it
		BlueprintObj->Modify();
		BlueprintObj->ComponentTemplates.Remove(Template);
	}

	Super::DestroyNode();
}
开发者ID:PickUpSU,项目名称:UnrealEngine4,代码行数:16,代码来源:K2Node_AddComponent.cpp


示例11: OnModeCreated

    static TSharedRef<FApplicationMode> OnModeCreated(const FName ModeName, TSharedRef<FApplicationMode> InMode)
    {
        if (ModeName == FBlueprintEditorApplicationModes::BlueprintComponentsMode)
        {
            //@TODO: Bit of a lie - push GetBlueprint up, or pass in editor!
            auto LieMode = StaticCastSharedRef<FComponentsEditorModeOverride>(InMode);

            UBlueprint* BP = LieMode->GetBlueprint();
            if(	BP )
            {
                FLiveEditorManager::Get().InjectNewBlueprintEditor( LieMode->GetBlueprintEditor() );
            }
        }

        return InMode;
    }
开发者ID:Codermay,项目名称:Unreal4,代码行数:16,代码来源:LiveEditor.cpp


示例12: ReconstructNode

void UK2Node_MacroInstance::NodeConnectionListChanged()
{
	Super::NodeConnectionListChanged();

	if (bReconstructNode)
	{
		ReconstructNode();

		UBlueprint* const Blueprint = GetBlueprint();
		if (Blueprint && !Blueprint->bBeingCompiled)
		{
			FBlueprintEditorUtils::MarkBlueprintAsModified(Blueprint);
			Blueprint->BroadcastChanged();
		}
	}
}
开发者ID:johndpope,项目名称:UE4,代码行数:16,代码来源:K2Node_MacroInstance.cpp


示例13: Transaction

void UAnimGraphNode_BlendListByEnum::ExposeEnumElementAsPin(FName EnumElementName)
{
	if (!VisibleEnumEntries.Contains(EnumElementName))
	{
		FScopedTransaction Transaction( LOCTEXT("ExposeElement", "ExposeElement") );
		Modify();

		VisibleEnumEntries.Add(EnumElementName);

		Node.AddPose();
	
		ReconstructNode();

		FBlueprintEditorUtils::MarkBlueprintAsStructurallyModified(GetBlueprint());
	}
}
开发者ID:Codermay,项目名称:Unreal4,代码行数:16,代码来源:AnimGraphNode_BlendListByEnum.cpp


示例14: GetBlueprint

SHierarchyView::~SHierarchyView()
{
	UWidgetBlueprint* Blueprint = GetBlueprint();
	if ( Blueprint )
	{
		Blueprint->OnChanged().RemoveAll(this);
		Blueprint->OnCompiled().RemoveAll(this);
	}

	if ( BlueprintEditor.IsValid() )
	{
		BlueprintEditor.Pin()->OnSelectedWidgetsChanged.RemoveAll(this);
	}

	GEditor->OnObjectsReplaced().RemoveAll(this);
}
开发者ID:johndpope,项目名称:UE4,代码行数:16,代码来源:SHierarchyView.cpp


示例15: 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


示例16:

void UK2Node_GetArrayItem::PropagatePinType(FEdGraphPinType& InType)
{
	UClass const* CallingContext = NULL;
	if (UBlueprint const* Blueprint = GetBlueprint())
	{
		CallingContext = Blueprint->GeneratedClass;
		if (CallingContext == NULL)
		{
			CallingContext = Blueprint->ParentClass;
		}
	}

	const UEdGraphSchema_K2* Schema = GetDefault<UEdGraphSchema_K2>();
	UEdGraphPin* ArrayPin = Pins[0];
	UEdGraphPin* ResultPin = Pins[2];

	ArrayPin->PinType = InType;
	ArrayPin->PinType.bIsArray = true;
	ArrayPin->PinType.bIsReference = false;

	ResultPin->PinType = InType;
	ResultPin->PinType.bIsArray = false;
	ResultPin->PinType.bIsReference = !(ResultPin->PinType.PinCategory == Schema->PC_Object || ResultPin->PinType.PinCategory == Schema->PC_Class || ResultPin->PinType.PinCategory == Schema->PC_Asset || ResultPin->PinType.PinCategory == Schema->PC_AssetClass || ResultPin->PinType.PinCategory == Schema->PC_Interface);
	ResultPin->PinType.bIsConst = false;


	// Verify that all previous connections to this pin are still valid with the new type
	for (TArray<UEdGraphPin*>::TIterator ConnectionIt(ArrayPin->LinkedTo); ConnectionIt; ++ConnectionIt)
	{
		UEdGraphPin* ConnectedPin = *ConnectionIt;
		if (!Schema->ArePinsCompatible(ArrayPin, ConnectedPin, CallingContext))
		{
			ArrayPin->BreakLinkTo(ConnectedPin);
		}
	}

	// Verify that all previous connections to this pin are still valid with the new type
	for (TArray<UEdGraphPin*>::TIterator ConnectionIt(ResultPin->LinkedTo); ConnectionIt; ++ConnectionIt)
	{
		UEdGraphPin* ConnectedPin = *ConnectionIt;
		if (!Schema->ArePinsCompatible(ResultPin, ConnectedPin, CallingContext))
		{
			ResultPin->BreakLinkTo(ConnectedPin);
		}
	}
}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:46,代码来源:K2Node_GetArrayItem.cpp


示例17: GetBlueprint

bool UK2Node_Variable::CanPasteHere(const UEdGraph* TargetGraph) const
{
	// Do not allow pasting of variables in BPs that cannot handle them
	if ( FBlueprintEditorUtils::FindBlueprintForGraph(TargetGraph)->BlueprintType == BPTYPE_MacroLibrary && VariableReference.IsSelfContext() )
	{
		// Self variables must be from a parent class to the macro BP
		if(UProperty* Property = VariableReference.ResolveMember<UProperty>(GetBlueprintClassFromNode()))
		{
			const UClass* CurrentClass = GetBlueprint()->SkeletonGeneratedClass->GetAuthoritativeClass();
			const UClass* PropertyClass = Property->GetOwnerClass()->GetAuthoritativeClass();
			const bool bIsChildOf = CurrentClass->IsChildOf(PropertyClass);
			return bIsChildOf;
		}
		return false;
	}
	return true;
}
开发者ID:didixp,项目名称:Ark-Dev-Kit,代码行数:17,代码来源:K2Node_Variable.cpp


示例18: FString

bool UK2Node_Variable::CreatePinForVariable(EEdGraphPinDirection Direction, FString InPinName/* = FString()*/)
{
	const UEdGraphSchema_K2* K2Schema = GetDefault<UEdGraphSchema_K2>();

	UProperty* VariableProperty = GetPropertyForVariable();
	// favor the skeleton property if possible (in case the property type has 
	// been changed, and not yet compiled).
	if (!VariableReference.IsSelfContext())
	{
		UClass* VariableClass = VariableReference.GetMemberParentClass(GetBlueprint()->GeneratedClass);
		if (UBlueprintGeneratedClass* BpClassOwner = Cast<UBlueprintGeneratedClass>(VariableClass))
		{
			// this variable could currently only be a part of some skeleton 
			// class (the blueprint has not be compiled with it yet), so let's 
			// check the skeleton class as well, see if we can pull pin data 
			// from there...
			UBlueprint* VariableBlueprint = CastChecked<UBlueprint>(BpClassOwner->ClassGeneratedBy, ECastCheckedType::NullAllowed);
			if (VariableBlueprint)
			{
				if (UProperty* SkelProperty = FindField<UProperty>(VariableBlueprint->SkeletonGeneratedClass, VariableReference.GetMemberName()))
				{
					VariableProperty = SkelProperty;
				}
			}
		}
	}

	if (VariableProperty != NULL)
	{
		const FString PinName = InPinName.IsEmpty()? GetVarNameString() : InPinName;
		// Create the pin
		UEdGraphPin* VariablePin = CreatePin(Direction, TEXT(""), TEXT(""), NULL, false, false, PinName);
		K2Schema->ConvertPropertyToPinType(VariableProperty, /*out*/ VariablePin->PinType);
		K2Schema->SetPinDefaultValueBasedOnType(VariablePin);
	}
	else
	{
		if (!VariableReference.IsLocalScope())
		{
			Message_Warn(*FString::Printf(TEXT("CreatePinForVariable: '%s' variable not found. Base class was probably changed."), *GetVarNameString()));
		}
		return false;
	}

	return true;
}
开发者ID:didixp,项目名称:Ark-Dev-Kit,代码行数:46,代码来源:K2Node_Variable.cpp


示例19: GetTemplateNamePin

FString UK2Node_AddComponent::GetDocumentationExcerptName() const
{
	UEdGraphPin* TemplateNamePin = GetTemplateNamePin();
	UBlueprint* Blueprint = GetBlueprint();

	if ((TemplateNamePin != NULL) && (Blueprint != NULL))
	{
		FString TemplateName = TemplateNamePin->DefaultValue;
		UActorComponent* SourceTemplate = Blueprint->FindTemplateByName(FName(*TemplateName));

		if (SourceTemplate != NULL)
		{
			return SourceTemplate->GetClass()->GetName();
		}
	}

	return Super::GetDocumentationExcerptName();
}
开发者ID:RandomDeveloperM,项目名称:UE4_Hairworks,代码行数:18,代码来源:K2Node_AddComponent.cpp


示例20: GetTemplateFromNode

void UK2Node_AddComponent::DestroyNode()
{
	// See if this node has a template
	UActorComponent* Template = GetTemplateFromNode();
	if (Template != NULL)
	{
		// Save current template state - this is needed in order to ensure that we restore to the correct Outer in the case of a compile prior to the undo/redo action.
		Template->Modify();

		// Get the blueprint so we can remove it from it
		UBlueprint* BlueprintObj = GetBlueprint();

		// remove it
		BlueprintObj->Modify();
		BlueprintObj->ComponentTemplates.Remove(Template);
	}

	Super::DestroyNode();
}
开发者ID:RandomDeveloperM,项目名称:UE4_Hairworks,代码行数:19,代码来源:K2Node_AddComponent.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ GetBoard函数代码示例发布时间:2022-05-30
下一篇:
C++ GetBlockSize函数代码示例发布时间: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