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

C++ GetGraph函数代码示例

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

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



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

示例1: OnImportPreset

void FSubstanceEditor::OnImportPreset()
{
	if (GetGraph())
	{
		SubstanceEditor::Helpers::ImportAndApplyPresetForGraph(GetGraph());
	}
}
开发者ID:RandomDeveloperM,项目名称:UE4_Hairworks,代码行数:7,代码来源:SubstanceEditor.cpp


示例2: Transaction

void USoundCueGraphNode::RemoveInputPin(UEdGraphPin* InGraphPin)
{
	const FScopedTransaction Transaction( NSLOCTEXT("UnrealEd", "SoundCueEditorDeleteInput", "Delete Sound Cue Input") );
	Modify();

	TArray<class UEdGraphPin*> InputPins;
	GetInputPins(InputPins);

	for (int32 InputIndex = 0; InputIndex < InputPins.Num(); InputIndex++)
	{
		if (InGraphPin == InputPins[InputIndex])
		{
			InGraphPin->MarkPendingKill();
			Pins.Remove(InGraphPin);
			// also remove the SoundNode child node so ordering matches
			SoundNode->Modify();
			SoundNode->RemoveChildNode(InputIndex);
			break;
		}
	}

	USoundCue* SoundCue = CastChecked<USoundCueGraph>(GetGraph())->GetSoundCue();
	SoundCue->CompileSoundNodesFromGraphNodes();
	SoundCue->MarkPackageDirty();

	// Refresh the current graph, so the pins can be updated
	GetGraph()->NotifyGraphChanged();
}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:28,代码来源:SoundCueGraphNode.cpp


示例3: OnExportPreset

void FSubstanceEditor::OnExportPreset() const
{
	if (GetGraph())
	{
		SubstanceEditor::Helpers::ExportPresetFromGraph(GetGraph());
	}
}
开发者ID:RandomDeveloperM,项目名称:UE4_Hairworks,代码行数:7,代码来源:SubstanceEditor.cpp


示例4: GetInput1Pin

/** Determine if any pins are connected, if so make all the other pins the same type, if not, make sure pins are switched back to wildcards */
void UK2Node_EnumEquality::NotifyPinConnectionListChanged(UEdGraphPin* Pin)
{
	Super::NotifyPinConnectionListChanged(Pin);

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

	UEdGraphPin* Input1Pin = GetInput1Pin();
	UEdGraphPin* Input2Pin = GetInput2Pin();

	if (Pin == Input1Pin || Pin == Input2Pin)
	{
		if ((Input1Pin->LinkedTo.Num() == 0) && (Input2Pin->LinkedTo.Num() == 0))
		{
			// Restore the wildcard status
			Input1Pin->PinType.PinCategory = Schema->PC_Wildcard;
			Input1Pin->PinType.PinSubCategory = TEXT("");
			Input1Pin->PinType.PinSubCategoryObject = NULL;
			Input2Pin->PinType.PinCategory = Schema->PC_Wildcard;
			Input2Pin->PinType.PinSubCategory = TEXT("");
			Input2Pin->PinType.PinSubCategoryObject = NULL;
			Schema->SetPinDefaultValueBasedOnType(Input1Pin);
			Schema->SetPinDefaultValueBasedOnType(Input2Pin);
			// We have to refresh the graph to get the enum dropdowns to go away
			GetGraph()->NotifyGraphChanged();
		}
		else if (Pin->LinkedTo.Num() > 0)
		{
			// Make sure the pin is a valid enum
			if (Pin->LinkedTo[0]->PinType.PinCategory == Schema->PC_Byte &&
				Pin->LinkedTo[0]->PinType.PinSubCategoryObject.IsValid() &&
				Pin->LinkedTo[0]->PinType.PinSubCategoryObject.Get()->IsA(UEnum::StaticClass()))
			{
				Pin->PinType = Pin->LinkedTo[0]->PinType;

				UEdGraphPin* OtherPin = (Input1Pin == Pin) ? Input2Pin : Input1Pin;

				// Enforce the type on the other pin
				OtherPin->PinType = Pin->PinType;
				UEdGraphSchema_K2::ValidateExistingConnections(OtherPin);
				// If we copied the pin type to a wildcard we have to refresh the graph to get the enum dropdown
				if (OtherPin->LinkedTo.Num() <= 0 && OtherPin->DefaultValue.IsEmpty())
				{
					Schema->SetPinDefaultValueBasedOnType(OtherPin);
					GetGraph()->NotifyGraphChanged();
				}
			}
			// A valid enum wasn't used to break the links
			else
			{
				Pin->BreakAllPinLinks();
			}
		}
		else if(Pin->DefaultValue.IsEmpty())
		{
			Schema->SetPinDefaultValueBasedOnType(Pin);
		}
	}
}
开发者ID:JustDo1989,项目名称:UnrealEngine4.11-HairWorks,代码行数:59,代码来源:K2Node_EnumEquality.cpp


示例5: GetGraph

void FSubstanceEditor::OnResetDefaultValues()
{
	if (GetGraph())
	{
		GetGraph()->Modify(true);
		Substance::Helpers::ResetToDefault(GetGraph()->Instance);
		Substance::Helpers::RenderAsync(GetGraph()->Instance);
	}
}
开发者ID:RandomDeveloperM,项目名称:UE4_Hairworks,代码行数:9,代码来源:SubstanceEditor.cpp


示例6: GetGraph

void UCreatureAnimStateNode::PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent)
{
	Super::PostEditChangeProperty(PropertyChangedEvent);
	if (PropertyChangedEvent.ChangeType == EPropertyChangeType::ValueSet&&GetGraph()!=nullptr)
	{
		GetGraph()->NotifyGraphChanged();
	}
	

}
开发者ID:Sephirothzc,项目名称:ProjectC,代码行数:10,代码来源:CreatureAnimStateNode.cpp


示例7: GetGraph

void UEnvironmentQueryGraphNode_Option::ResetNodeOwner()
{
	Super::ResetNodeOwner();

	UEnvQueryOption* OptionInstance = Cast<UEnvQueryOption>(NodeInstance);
	if (OptionInstance && OptionInstance->Generator)
	{
		UObject* GraphOwner = GetGraph() ? GetGraph()->GetOuter() : nullptr;
		OptionInstance->Generator->Rename(NULL, GraphOwner, REN_DontCreateRedirectors | REN_DoNotDirty);
	}
}
开发者ID:PickUpSU,项目名称:UnrealEngine4,代码行数:11,代码来源:EnvironmentQueryGraphNode_Option.cpp


示例8: GetInputClass

void UK2Node_GetClassDefaults::OnClassPinChanged()
{
	TArray<UEdGraphPin*> OldPins = Pins;
	TArray<UEdGraphPin*> OldOutputPins;

	// Gather all current output pins
	for(int32 PinIndex = 0; PinIndex < OldPins.Num(); ++PinIndex)
	{
		UEdGraphPin* OldPin = OldPins[PinIndex];
		if(OldPin->Direction == EGPD_Output)
		{
			Pins.Remove(OldPin);
			OldOutputPins.Add(OldPin);
		}
	}

	// Clear the current output pin settings (so they don't carry over to the new set)
	ShowPinForProperties.Empty();

	// Create output pins for the new class type
	UClass* InputClass = GetInputClass();
	CreateOutputPins(InputClass);

	// Destroy the previous set of output pins
	DestroyPinList(OldOutputPins);

	// Notify the graph that the node has been changed
	if(UEdGraph* Graph = GetGraph())
	{
		Graph->NotifyGraphChanged();
	}
}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:32,代码来源:K2Node_GetClassDefaults.cpp


示例9: AllocateDefaultPins

void UK2Node::ReallocatePinsDuringReconstruction(TArray<UEdGraphPin*>& OldPins)
{
	AllocateDefaultPins();

	for (auto OldPin : OldPins)
	{
		if (OldPin->ParentPin)
		{
			// find the new pin that corresponds to parent, and split it if it isn't already split
			for (auto NewPin : Pins)
			{
				if (FCString::Stricmp(*(NewPin->PinName), *(OldPin->ParentPin->PinName)) == 0)
				{
					// Make sure we're not dealing with a menu node
					UEdGraph* OuterGraph = GetGraph();
					if (OuterGraph && OuterGraph->Schema && NewPin->SubPins.Num() == 0)
					{
						NewPin->PinType = OldPin->ParentPin->PinType;
						GetSchema()->SplitPin(NewPin);
					}
				}
			}
		}
	}
}
开发者ID:mysheng8,项目名称:UnrealEngine,代码行数:25,代码来源:K2Node.cpp


示例10: GetGraph

void UK2Node_Composite::PostPlacedNewNode()
{
	// Create a new graph
	BoundGraph = FBlueprintEditorUtils::CreateNewGraph(this, NAME_None, UEdGraph::StaticClass(), GetGraph()->Schema);
	check(BoundGraph);

	// Create the entry/exit nodes inside the new graph
	{
		FGraphNodeCreator<UK2Node_Tunnel> EntryNodeCreator(*BoundGraph);
		UK2Node_Tunnel* EntryNode = EntryNodeCreator.CreateNode();
		EntryNode->bCanHaveOutputs = true;
		EntryNode->bCanHaveInputs = false;
		EntryNode->OutputSourceNode = this;
		EntryNodeCreator.Finalize();

		InputSinkNode = EntryNode;
	}
	{
		FGraphNodeCreator<UK2Node_Tunnel> ExitNodeCreator(*BoundGraph);
		UK2Node_Tunnel* ExitNode = ExitNodeCreator.CreateNode();
		ExitNode->bCanHaveOutputs = false;
		ExitNode->bCanHaveInputs = true;
		ExitNode->InputSinkNode = this;
		ExitNodeCreator.Finalize();

		OutputSourceNode = ExitNode;
	}

	// Add the new graph as a child of our parent graph
	GetGraph()->SubGraphs.Add(BoundGraph);
}
开发者ID:johndpope,项目名称:UE4,代码行数:31,代码来源:K2Node_Composite.cpp


示例11: check

void UAnimStateNode::PostPlacedNewNode()
{
	// Create a new animation graph
	check(BoundGraph == NULL);
	BoundGraph = FBlueprintEditorUtils::CreateNewGraph(
		this,
		NAME_None,
		UAnimationStateGraph::StaticClass(),
		UAnimationStateGraphSchema::StaticClass());
	check(BoundGraph);

	// Find an interesting name
	TSharedPtr<INameValidatorInterface> NameValidator = FNameValidatorFactory::MakeValidator(this);
	FBlueprintEditorUtils::RenameGraphWithSuggestion(BoundGraph, NameValidator, TEXT("State"));

	// Initialize the anim graph
	const UEdGraphSchema* Schema = BoundGraph->GetSchema();
	Schema->CreateDefaultNodesForGraph(*BoundGraph);

	// Add the new graph as a child of our parent graph
	UEdGraph* ParentGraph = GetGraph();

	if(ParentGraph->SubGraphs.Find(BoundGraph) == INDEX_NONE)
	{
		ParentGraph->SubGraphs.Add(BoundGraph);
	}
}
开发者ID:JustDo1989,项目名称:UnrealEngine4.11-HairWorks,代码行数:27,代码来源:AnimStateNode.cpp


示例12: GetGraph

void CGraphWnd::ClearGraph(int graphnum, BOOL bRedraw)
{
    CGraphProps* graph;
    if (graphnum != -1)
    {
        graph = GetGraph(graphnum);
        if (graph == NULL) return;
        graph->RemoveAll();
    } else
    {
        int index;
        graph = GetFirstGraph(&index);
        while (graph!=NULL)
        {
            graph->RemoveAll();
            graph = GetNextGraph(&index);
        };
    };
    if (graph_frame != NULL)
    {
        SGraphChange sgc;
        sgc.graphnum = graphnum;
        sgc.bRedraw = bRedraw;
        sgc.main_wnd_ptr = this;

        graph_frame->UpdateViews(GRAPH_GRAPH_CLEARED, &sgc);
    };
}
开发者ID:ragar90,项目名称:AiPI,代码行数:28,代码来源:GraphWnd.cpp


示例13: PinName

FString UK2Node_Tunnel::CreateUniquePinName(FString InSourcePinName) const
{
	if (GetClass() == UK2Node_Tunnel::StaticClass())
	{
		// When dealing with a tunnel node that is not a sub class (macro/collapsed graph entry and result), attempt to find the paired node and find a valid name between the two
		TWeakObjectPtr<UK2Node_EditablePinBase> TunnelEntry;
		TWeakObjectPtr<UK2Node_EditablePinBase> TunnelResult;
		FBlueprintEditorUtils::GetEntryAndResultNodes(GetGraph(), TunnelEntry, TunnelResult);

		if (TunnelEntry.IsValid() && TunnelResult.IsValid())
		{
			FString PinName(InSourcePinName);

			int32 Index = 1;
			while (TunnelEntry.Get()->FindPin(PinName) != nullptr || TunnelResult.Get()->FindPin(PinName) != nullptr)
			{
				++Index;
				PinName = InSourcePinName + FString::FromInt(Index);
			}

			return PinName;
		}
	}

	return Super::CreateUniquePinName(InSourcePinName);
}
开发者ID:JustDo1989,项目名称:UnrealEngine4.11-HairWorks,代码行数:26,代码来源:K2Node_Tunnel.cpp


示例14: GetClassToSpawn

void UK2Node_LatentAbilityCall::PinDefaultValueChanged(UEdGraphPin* ChangedPin)
{
	if (ChangedPin->PinName == FK2Node_LatentAbilityCallHelper::ClassPinName)
	{
		const UEdGraphSchema_K2* K2Schema = GetDefault<UEdGraphSchema_K2>();

		// Because the archetype has changed, we break the output link as the output pin type will change
		//UEdGraphPin* ResultPin = GetResultPin();
		//ResultPin->BreakAllPinLinks();

		// Remove all pins related to archetype variables
		for (auto OldPin : SpawnParmPins)
		{
			OldPin->BreakAllPinLinks();
			Pins.Remove(OldPin);
		}
		SpawnParmPins.Empty();

		UClass* UseSpawnClass = GetClassToSpawn();
		if (UseSpawnClass != NULL)
		{
			CreatePinsForClass(UseSpawnClass);
		}

		// Refresh the UI for the graph so the pin changes show up
		UEdGraph* Graph = GetGraph();
		Graph->NotifyGraphChanged();

		// Mark dirty
		FBlueprintEditorUtils::MarkBlueprintAsModified(GetBlueprint());
	}
}
开发者ID:johndpope,项目名称:UE4,代码行数:32,代码来源:K2Node_LatentAbilityCall.cpp


示例15: if

void UK2Node_SwitchString::PostEditChangeProperty(struct FPropertyChangedEvent& PropertyChangedEvent)
{
	bool bIsDirty = false;
	FName PropertyName = (PropertyChangedEvent.Property != NULL) ? PropertyChangedEvent.Property->GetFName() : NAME_None;
	if (PropertyName == TEXT("PinNames"))
	{
		bIsDirty = true;
	}
	else if (PropertyName == TEXT("bIsCaseSensitive"))
	{
		FunctionName = (bIsCaseSensitive == true)
			?  TEXT("NotEqual_StrStr")
			: TEXT("NotEqual_StriStri");

		FunctionClass = UKismetStringLibrary::StaticClass();
		bIsDirty = true;
	}
	 
	if (bIsDirty)
	{
		ReconstructNode();
		GetGraph()->NotifyGraphChanged();
	}
	Super::PostEditChangeProperty(PropertyChangedEvent);
}
开发者ID:Codermay,项目名称:Unreal4,代码行数:25,代码来源:K2Node_SwitchString.cpp


示例16: check

void UAnimGraphNode_StateMachineBase::PostPlacedNewNode()
{
	// Create a new animation graph
	check(EditorStateMachineGraph == NULL);
	EditorStateMachineGraph = CastChecked<UAnimationStateMachineGraph>(FBlueprintEditorUtils::CreateNewGraph(this, NAME_None, UAnimationStateMachineGraph::StaticClass(), UAnimationStateMachineSchema::StaticClass()));
	check(EditorStateMachineGraph);
	EditorStateMachineGraph->OwnerAnimGraphNode = this;

	// Find an interesting name
	TSharedPtr<INameValidatorInterface> NameValidator = FNameValidatorFactory::MakeValidator(this);
	FBlueprintEditorUtils::RenameGraphWithSuggestion(EditorStateMachineGraph, NameValidator, TEXT("New State Machine"));

	// Initialize the anim graph
	const UEdGraphSchema* Schema = EditorStateMachineGraph->GetSchema();
	Schema->CreateDefaultNodesForGraph(*EditorStateMachineGraph);

	// Add the new graph as a child of our parent graph
	UEdGraph* ParentGraph = GetGraph();
	
	if(ParentGraph->SubGraphs.Find(EditorStateMachineGraph) == INDEX_NONE)
	{
		ParentGraph->Modify();
		ParentGraph->SubGraphs.Add(EditorStateMachineGraph);
	}
}
开发者ID:JustDo1989,项目名称:UnrealEngine4.11-HairWorks,代码行数:25,代码来源:AnimGraphNode_StateMachineBase.cpp


示例17: SetParameterName

void UMaterialGraphNode::SetParameterName(const FString& NewName)
{
	MaterialExpression->SetEditableName(NewName);

	//@TODO: Push into the SetEditableName interface
	CastChecked<UMaterialGraph>(GetGraph())->Material->UpdateExpressionParameterName(MaterialExpression);
}
开发者ID:RandomDeveloperM,项目名称:UE4_Hairworks,代码行数:7,代码来源:MaterialGraphNode.cpp


示例18: PNL_THROW

float CMNet::ComputeLogLik( const CEvidence *pEv ) const
{

    if( GetModelDomain() != pEv->GetModelDomain() )
    {
        PNL_THROW(CBadArg, "different model domain")
    }
    int nnodes = GetGraph()->GetNumberOfNodes();
    int nObsNodes = pEv->GetNumberObsNodes();
    if( nObsNodes != nnodes )
    {
        PNL_THROW(CNotImplemented, "all nodes must be observed")
    }

    const int* flags = pEv->GetObsNodesFlags();
    if( std::find( flags, flags + nnodes, 0 ) != flags + nnodes )
    {
        PNL_THROW( CNotImplemented, "all nodes must be observed" )
    }

    float ll = 0.0f;
    int i;
    for( i = 0; i < GetNumberOfCliques(); i++ )
    {
        ll += GetFactor( i )->GetLogLik( pEv );
    }
    return ll;
}
开发者ID:lspatial,项目名称:spstatics_parallel,代码行数:28,代码来源:pnlMNet.cpp


示例19: GetClassToSpawn

void UK2Node_LiveEditObject::PinDefaultValueChanged(UEdGraphPin* Pin) 
{
	if(Pin->PinName == UK2Node_LiveEditObjectStatics::BaseClassPinName)
	{
		const UEdGraphSchema_K2* K2Schema = GetDefault<UEdGraphSchema_K2>();

		// Remove all pins related to archetype variables
		TArray<UEdGraphPin*> OldPins = Pins;
		for(int32 i=0; i<OldPins.Num(); i++)
		{
			UEdGraphPin* OldPin = OldPins[i];
			if(	IsSpawnVarPin(OldPin) )
			{
				Pin->BreakAllPinLinks();
				Pins.Remove(OldPin);
			}
		}

		UClass* UseSpawnClass = GetClassToSpawn();
		if(UseSpawnClass != NULL)
		{
			CreatePinsForClass(UseSpawnClass);
		}

		// Refresh the UI for the graph so the pin changes show up
		UEdGraph* Graph = GetGraph();
		Graph->NotifyGraphChanged();

		// Mark dirty
		FBlueprintEditorUtils::MarkBlueprintAsModified(GetBlueprint());
	}
}
开发者ID:kidaa,项目名称:UnrealEngineVR,代码行数:32,代码来源:K2Node_LiveEditObject.cpp


示例20: GetGraph

void UEdGraphNode::DestroyNode()
{
	UEdGraph* ParentGraph = GetGraph();
	check(ParentGraph);

	// Remove the node - this will break all links. Will be GC'd after this.
	ParentGraph->RemoveNode(this);
}
开发者ID:amyvmiwei,项目名称:UnrealEngine4,代码行数:8,代码来源:EdGraphNode.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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