本文整理汇总了C++中GetBlueprint函数的典型用法代码示例。如果您正苦于以下问题:C++ GetBlueprint函数的具体用法?C++ GetBlueprint怎么用?C++ GetBlueprint使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GetBlueprint函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
}
}
示例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;
}
示例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;
}
示例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);
}
示例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;
}
示例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;
}
示例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();
}
示例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();
}
}
}
示例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;
}
示例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();
}
示例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;
}
示例12: ReconstructNode
void UK2Node_MacroInstance::NodeConnectionListChanged()
{
Super::NodeConnectionListChanged();
if (bReconstructNode)
{
ReconstructNode();
UBlueprint* const Blueprint = GetBlueprint();
if (Blueprint && !Blueprint->bBeingCompiled)
{
FBlueprintEditorUtils::MarkBlueprintAsModified(Blueprint);
Blueprint->BroadcastChanged();
}
}
}
示例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());
}
}
示例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);
}
示例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);
}
}
}
}
}