本文整理汇总了C++中UBlueprint类的典型用法代码示例。如果您正苦于以下问题:C++ UBlueprint类的具体用法?C++ UBlueprint怎么用?C++ UBlueprint使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了UBlueprint类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: 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
示例2: RecompileOutOfDateKismetForSelection
/**
* Called to recompile the out of date blueprint for the current selection set
*/
void RecompileOutOfDateKismetForSelection()
{
int32 BlueprintFailures = 0;
// Run thru all selected actors, looking for out of date blueprints
FSelectionIterator SelectedActorItr( GEditor->GetSelectedActorIterator() );
for ( ; SelectedActorItr; ++SelectedActorItr)
{
AActor* CurrentActor = Cast<AActor>(*SelectedActorItr);
UBlueprint* Blueprint = Cast<UBlueprint>(CurrentActor->GetClass()->ClassGeneratedBy);
if ((Blueprint != NULL) && (!Blueprint->IsUpToDate()))
{
FKismetEditorUtilities::CompileBlueprint(Blueprint);
if (Blueprint->Status == BS_Error)
{
++BlueprintFailures;
}
}
}
if (BlueprintFailures)
{
UE_LOG(LogViewportBlueprintMenu, Warning, TEXT("%d blueprints failed to be recompiled"), BlueprintFailures);
}
}
开发者ID:Codermay,项目名称:Unreal4,代码行数:29,代码来源:BlueprintEditorViewportContextMenuExtender.cpp
示例3: Modify
bool UMovieScene::RemoveSpawnable( const FGuid& Guid )
{
bool bAnythingRemoved = false;
if( ensure( Guid.IsValid() ) )
{
for( auto SpawnableIter( Spawnables.CreateIterator() ); SpawnableIter; ++SpawnableIter )
{
auto& CurSpawnable = *SpawnableIter;
if( CurSpawnable.GetGuid() == Guid )
{
Modify();
{
UClass* GeneratedClass = CurSpawnable.GetClass();
UBlueprint* Blueprint = GeneratedClass ? Cast<UBlueprint>(GeneratedClass->ClassGeneratedBy) : NULL;
check(NULL != Blueprint);
// @todo sequencer: Also remove created Blueprint inner object. Is this sufficient? Needs to work with Undo too!
Blueprint->ClearFlags( RF_Standalone ); // @todo sequencer: Probably not needed for Blueprint
Blueprint->MarkPendingKill();
}
RemoveObjectBinding( Guid );
// Found it!
Spawnables.RemoveAt( SpawnableIter.GetIndex() );
bAnythingRemoved = true;
break;
}
}
}
return bAnythingRemoved;
}
开发者ID:Tigrouzen,项目名称:UnrealEngine-4,代码行数:35,代码来源:MovieScene.cpp
示例4: Super
UGameplayAbility::UGameplayAbility(const class FPostConstructInitializeProperties& PCIP)
: Super(PCIP)
{
CostGameplayEffect = NULL;
CooldownGameplayEffect = NULL;
{
static FName FuncName = FName(TEXT("K2_ShouldAbilityRespondToEvent"));
UFunction* ShouldRespondFunction = GetClass()->FindFunctionByName(FuncName);
HasBlueprintShouldAbilityRespondToEvent = ShouldRespondFunction && ShouldRespondFunction->GetOuter()->IsA(UBlueprintGeneratedClass::StaticClass());
}
{
static FName FuncName = FName(TEXT("K2_CanActivateAbility"));
UFunction* CanActivateFunction = GetClass()->FindFunctionByName(FuncName);
HasBlueprintCanUse = CanActivateFunction && CanActivateFunction->GetOuter()->IsA(UBlueprintGeneratedClass::StaticClass());
}
{
static FName FuncName = FName(TEXT("K2_ActivateAbility"));
UFunction* ActivateFunction = GetClass()->FindFunctionByName(FuncName);
HasBlueprintActivate = ActivateFunction && ActivateFunction->GetOuter()->IsA(UBlueprintGeneratedClass::StaticClass());
}
#if WITH_EDITOR
/** Autoregister abilities with the blueprint debugger in the editor.*/
if (!HasAnyFlags(RF_ClassDefaultObject))
{
UBlueprint* BP = Cast<UBlueprint>(GetClass()->ClassGeneratedBy);
if (BP && (BP->GetWorldBeingDebugged() == nullptr || BP->GetWorldBeingDebugged() == GetWorld()))
{
BP->SetObjectBeingDebugged(this);
}
}
#endif
}
开发者ID:1vanK,项目名称:AHRUnrealEngine,代码行数:34,代码来源:GameplayAbility.cpp
示例5: check
TSharedRef<SDockTab> FMerge::GenerateMergeWidget(const UBlueprint& Object, TSharedRef<FBlueprintEditor> Editor)
{
auto ActiveTabPtr = ActiveTab.Pin();
if( ActiveTabPtr.IsValid() )
{
// just bring the tab to the foreground:
auto CurrentTab = FGlobalTabmanager::Get()->InvokeTab(MergeToolTabId);
check( CurrentTab == ActiveTabPtr );
return ActiveTabPtr.ToSharedRef();
}
// merge the local asset with the depot, SCC provides us with the last common revision as
// a basis for the merge:
TSharedPtr<SWidget> Contents;
if (!PendingMerge(Object))
{
// this should load up the merge-tool, with an asset picker, where they
// can pick the asset/revisions to merge against
Contents = GenerateMergeTabContents(Editor, nullptr, FRevisionInfo::InvalidRevision(), nullptr, FRevisionInfo::InvalidRevision(), &Object, FOnMergeResolved());
}
else
{
// @todo DO: this will probably need to be async.. pulling down some old versions of assets:
const FString& PackageName = Object.GetOutermost()->GetName();
const FString& AssetName = Object.GetName();
FSourceControlStatePtr SourceControlState = FMergeToolUtils::GetSourceControlState(PackageName);
if (!SourceControlState.IsValid())
{
DisplayErrorMessage(
FText::Format(
LOCTEXT("MergeFailedNoSourceControl", "Aborted Load of {0} from {1} because the source control state was invalidated")
, FText::FromString(AssetName)
, FText::FromString(PackageName)
)
);
Contents = SNew(SHorizontalBox);
}
else
{
ISourceControlState const& SourceControlStateRef = *SourceControlState;
FRevisionInfo CurrentRevInfo = FRevisionInfo::InvalidRevision();
const UBlueprint* RemoteBlueprint = Cast< UBlueprint >(LoadHeadRev(PackageName, AssetName, SourceControlStateRef, CurrentRevInfo));
FRevisionInfo BaseRevInfo = FRevisionInfo::InvalidRevision();
const UBlueprint* BaseBlueprint = Cast< UBlueprint >(LoadBaseRev(PackageName, AssetName, SourceControlStateRef, BaseRevInfo));
Contents = GenerateMergeTabContents(Editor, BaseBlueprint, BaseRevInfo, RemoteBlueprint, CurrentRevInfo, &Object, FOnMergeResolved());
}
}
TSharedRef<SDockTab> Tab = FGlobalTabmanager::Get()->InvokeTab(MergeToolTabId);
Tab->SetContent(Contents.ToSharedRef());
ActiveTab = Tab;
return Tab;
}
开发者ID:JustDo1989,项目名称:UnrealEngine4.11-HairWorks,代码行数:60,代码来源:Merge.cpp
示例6: NSLOCTEXT
FText UK2Node_DynamicCast::GetNodeTitle(ENodeTitleType::Type TitleType) const
{
if (TargetType == nullptr)
{
return NSLOCTEXT("K2Node_DynamicCast", "BadCastNode", "Bad cast node");
}
else if (CachedNodeTitle.IsOutOfDate())
{
// If casting to BP class, use BP name not class name (ie. remove the _C)
FString TargetName;
UBlueprint* CastToBP = UBlueprint::GetBlueprintFromClass(TargetType);
if (CastToBP != NULL)
{
TargetName = CastToBP->GetName();
}
else
{
TargetName = TargetType->GetName();
}
FFormatNamedArguments Args;
Args.Add(TEXT("TargetName"), FText::FromString(TargetName));
// FText::Format() is slow, so we cache this to save on performance
CachedNodeTitle = FText::Format(NSLOCTEXT("K2Node_DynamicCast", "CastTo", "Cast To {TargetName}"), Args);
}
return CachedNodeTitle;
}
开发者ID:Codermay,项目名称:Unreal4,代码行数:28,代码来源:K2Node_DynamicCast.cpp
示例7: CompileBlueprint
/**
* Simulates the user pressing the blueprint's compile button (will load the
* blueprint first if it isn't already).
*
* @param BlueprintAssetPath The asset object path that you wish to compile.
* @return False if we failed to load the blueprint, true otherwise
*/
static bool CompileBlueprint(const FString& BlueprintAssetPath)
{
UBlueprint* BlueprintObj = Cast<UBlueprint>(StaticLoadObject(UBlueprint::StaticClass(), NULL, *BlueprintAssetPath));
if (!BlueprintObj || !BlueprintObj->ParentClass)
{
UE_LOG(LogBlueprintAutomationTests, Error, TEXT("Failed to compile invalid blueprint, or blueprint parent no longer exists."));
return false;
}
UPackage* const BlueprintPackage = Cast<UPackage>(BlueprintObj->GetOutermost());
// compiling the blueprint will inherently dirty the package, but if there
// weren't any changes to save before, there shouldn't be after
bool const bStartedWithUnsavedChanges = (BlueprintPackage != nullptr) ? BlueprintPackage->IsDirty() : true;
bool bIsRegeneratingOnLoad = false;
bool bSkipGarbageCollection = true;
FBlueprintEditorUtils::RefreshAllNodes(BlueprintObj);
FKismetEditorUtilities::CompileBlueprint(BlueprintObj, bIsRegeneratingOnLoad, bSkipGarbageCollection);
if (BlueprintPackage != nullptr)
{
BlueprintPackage->SetDirtyFlag(bStartedWithUnsavedChanges);
}
return true;
}
开发者ID:1vanK,项目名称:AHRUnrealEngine,代码行数:33,代码来源:BlueprintAutomationTests.cpp
示例8: CanBuildRoadmap
bool FKismetConnectionDrawingPolicy::CanBuildRoadmap() const
{
UBlueprint* TargetBP = FBlueprintEditorUtils::FindBlueprintForGraphChecked(GraphObj);
UObject* ActiveObject = TargetBP->GetObjectBeingDebugged();
return ActiveObject != NULL;
}
开发者ID:Tigrouzen,项目名称:UnrealEngine-4,代码行数:7,代码来源:ConnectionDrawingPolicy.cpp
示例9: GetTransientPackage
//------------------------------------------------------------------------------
static UBlueprint* BlueprintNodeTemplateCacheImpl::MakeCompatibleBlueprint(TSubclassOf<UBlueprint> BlueprintClass, UClass* ParentClass, TSubclassOf<UBlueprintGeneratedClass> GeneratedClassType)
{
EBlueprintType BlueprintType = BPTYPE_Normal;
// @TODO: BPTYPE_LevelScript requires a level outer, which we don't want to have here... can we get away without it?
// if (BlueprintClass->IsChildOf<ULevelScriptBlueprint>())
// {
// BlueprintType = BPTYPE_LevelScript;
// }
if (GeneratedClassType == nullptr)
{
GeneratedClassType = UBlueprintGeneratedClass::StaticClass();
}
UPackage* BlueprintOuter = GetTransientPackage();
FString const DesiredName = FString::Printf(TEXT("PROTO_BP_%s"), *BlueprintClass->GetName());
FName const BlueprintName = MakeUniqueObjectName(BlueprintOuter, BlueprintClass, FName(*DesiredName));
BlueprintClass = FBlueprintEditorUtils::FindFirstNativeClass(BlueprintClass);
UBlueprint* NewBlueprint = FKismetEditorUtilities::CreateBlueprint(ParentClass, BlueprintOuter, BlueprintName, BlueprintType, BlueprintClass, GeneratedClassType);
NewBlueprint->SetFlags(RF_Transient);
++MadeBlueprintCount;
float const AproxBlueprintSize = ApproximateMemFootprint(NewBlueprint);
// track the average blueprint size, so that we can attempt to predict
// whether a blueprint will fail to be cached (when the cache is near full)
AverageBlueprintSize = AverageBlueprintSize * ((float)(MadeBlueprintCount-1) / MadeBlueprintCount) +
(AproxBlueprintSize / MadeBlueprintCount) + 0.5f;
return NewBlueprint;
}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:33,代码来源:BlueprintNodeTemplateCache.cpp
示例10:
bool UK2Node_InputKey::IsCompatibleWithGraph(UEdGraph const* Graph) const
{
UBlueprint* Blueprint = FBlueprintEditorUtils::FindBlueprintForGraph(Graph);
UEdGraphSchema_K2 const* K2Schema = Cast<UEdGraphSchema_K2>(Graph->GetSchema());
bool const bIsConstructionScript = (K2Schema != nullptr) ? K2Schema->IsConstructionScript(Graph) : false;
return (Blueprint != nullptr) && Blueprint->SupportsInputEvents() && !bIsConstructionScript && Super::IsCompatibleWithGraph(Graph);
}
开发者ID:Codermay,项目名称:Unreal4,代码行数:9,代码来源:K2Node_InputKey.cpp
示例11: SNew
TSharedRef<SWidget> FEditorClassUtils::GetSourceLinkFormatted(const UClass* Class, const TWeakObjectPtr<UObject> ObjectWeakPtr, const FText& BlueprintFormat, const FText& CodeFormat)
{
TSharedRef<SWidget> SourceHyperlink = SNew( SSpacer );
UBlueprint* Blueprint = (Class ? Cast<UBlueprint>(Class->ClassGeneratedBy) : nullptr);
if (Blueprint)
{
struct Local
{
static void OnEditBlueprintClicked( TWeakObjectPtr<UBlueprint> InBlueprint, TWeakObjectPtr<UObject> InAsset )
{
if (UBlueprint* BlueprintToEdit = InBlueprint.Get())
{
// Set the object being debugged if given an actor reference (if we don't do this before we edit the object the editor wont know we are debugging something)
if (UObject* Asset = InAsset.Get())
{
check(Asset->GetClass()->ClassGeneratedBy == BlueprintToEdit);
BlueprintToEdit->SetObjectBeingDebugged(Asset);
}
// Open the blueprint
GEditor->EditObject( BlueprintToEdit );
}
}
};
TWeakObjectPtr<UBlueprint> BlueprintPtr = Blueprint;
SourceHyperlink = SNew(SHyperlink)
.Style(FEditorStyle::Get(), "Common.GotoBlueprintHyperlink")
.OnNavigate_Static(&Local::OnEditBlueprintClicked, BlueprintPtr, ObjectWeakPtr)
.Text(FText::Format(BlueprintFormat, FText::FromString(Blueprint->GetName())))
.ToolTipText(NSLOCTEXT("SourceHyperlink", "EditBlueprint_ToolTip", "Click to edit the blueprint"));
}
else if( FSourceCodeNavigation::IsCompilerAvailable() )
{
FString ClassHeaderPath;
if( FSourceCodeNavigation::FindClassHeaderPath( Class, ClassHeaderPath ) && IFileManager::Get().FileSize( *ClassHeaderPath ) != INDEX_NONE )
{
struct Local
{
static void OnEditCodeClicked( FString InClassHeaderPath )
{
FString AbsoluteHeaderPath = IFileManager::Get().ConvertToAbsolutePathForExternalAppForRead(*InClassHeaderPath);
FSourceCodeNavigation::OpenSourceFile( AbsoluteHeaderPath );
}
};
SourceHyperlink = SNew(SHyperlink)
.Style(FEditorStyle::Get(), "Common.GotoNativeCodeHyperlink")
.OnNavigate_Static(&Local::OnEditCodeClicked, ClassHeaderPath)
.Text(FText::Format(CodeFormat, FText::FromString(FPaths::GetCleanFilename( *ClassHeaderPath ) ) ) )
.ToolTipText(FText::Format(NSLOCTEXT("SourceHyperlink", "GoToCode_ToolTip", "Click to open this source file in {0}"), FSourceCodeNavigation::GetSuggestedSourceCodeIDE()));
}
}
return SourceHyperlink;
}
开发者ID:RandomDeveloperM,项目名称:UE4_Hairworks,代码行数:57,代码来源:EditorClassUtils.cpp
示例12: GetTemplateNamePin
FText UK2Node_AddComponent::GetNodeTitle(ENodeTitleType::Type TitleType) const
{
FText CachedAssetTitle;
FText CachedNodeTitle;
UEdGraphPin* TemplateNamePin = GetTemplateNamePin();
if (TemplateNamePin != nullptr)
{
FString TemplateName = TemplateNamePin->DefaultValue;
UBlueprint* Blueprint = GetBlueprint();
if (UActorComponent* SourceTemplate = Blueprint->FindTemplateByName(FName(*TemplateName)))
{
{
FFormatNamedArguments Args;
Args.Add(TEXT("ComponentType"), SourceTemplate->GetClass()->GetDisplayNameText());
CachedNodeTitle = FText::Format(LOCTEXT("AddClass", "Add {ComponentType}"), Args);
}
UChildActorComponent* SubActorComp = Cast<UChildActorComponent>(SourceTemplate);
if (const UObject* AssociatedAsset = SourceTemplate->AdditionalStatObject())
{
FFormatNamedArguments Args;
Args.Add(TEXT("AssetType"), AssociatedAsset->GetClass()->GetDisplayNameText());
Args.Add(TEXT("AssetName"), FText::FromString(AssociatedAsset->GetName()));
CachedAssetTitle = FText::Format(LOCTEXT("AddComponentAssetDescription", "{AssetType} {AssetName}"), Args);
}
else if ((SubActorComp != nullptr) && (SubActorComp->GetChildActorClass() != nullptr))
{
FFormatNamedArguments Args;
Args.Add(TEXT("ComponentClassName"), SubActorComp->GetChildActorClass()->GetDisplayNameText());
CachedAssetTitle = FText::Format(LOCTEXT("AddChildActorComponent", "Actor Class {ComponentClassName}"), Args);
}
else
{
CachedAssetTitle = FText::GetEmpty();
}
}
}
if (!CachedNodeTitle.IsEmpty())
{
if (TitleType == ENodeTitleType::FullTitle)
{
return FText::Format(LOCTEXT("FullAddComponentTitle", "{0}\n{1}"), CachedNodeTitle, CachedAssetTitle);
}
else if (!CachedAssetTitle.IsEmpty())
{
return FText::Format(LOCTEXT("ShortAddComponentTitle", "{0} [{1}]"), CachedNodeTitle, CachedAssetTitle);
}
else
{
return CachedNodeTitle;
}
}
return Super::GetNodeTitle(TitleType);
}
开发者ID:RandomDeveloperM,项目名称:UE4_Hairworks,代码行数:57,代码来源:K2Node_AddComponent.cpp
示例13: Transaction
FReply FKismetVariableDragDropAction::DroppedOnNode(FVector2D ScreenPosition, FVector2D GraphPosition)
{
UK2Node_Variable* TargetNode = Cast<UK2Node_Variable>(GetHoveredNode());
if (TargetNode && (VariableName != TargetNode->GetVarName()))
{
const FScopedTransaction Transaction( LOCTEXT("ReplacePinVariable", "Replace Pin Variable") );
UProperty* VariableProperty = GetVariableProperty();
if(CanVariableBeDropped(VariableProperty, *TargetNode->GetGraph()))
{
const FString OldVarName = TargetNode->GetVarNameString();
const UEdGraphSchema_K2* Schema = Cast<const UEdGraphSchema_K2>(TargetNode->GetSchema());
TArray<class UEdGraphPin*> BadLinks;
GetLinksThatWillBreak(TargetNode,VariableProperty,BadLinks);
// Change the variable name and context
UBlueprint* DropOnBlueprint = FBlueprintEditorUtils::FindBlueprintForGraph(TargetNode->GetGraph());
UEdGraphPin* Pin = TargetNode->FindPin(OldVarName);
DropOnBlueprint->Modify();
TargetNode->Modify();
if (Pin != NULL)
{
Pin->Modify();
}
UEdGraphSchema_K2::ConfigureVarNode(TargetNode, VariableName, VariableSource.Get(), DropOnBlueprint);
if ((Pin == NULL) || (Pin->LinkedTo.Num() == BadLinks.Num()) || (Schema == NULL))
{
TargetNode->GetSchema()->ReconstructNode(*TargetNode);
}
else
{
FEdGraphPinType NewPinType;
Schema->ConvertPropertyToPinType(VariableProperty,NewPinType);
Pin->PinName = VariableName.ToString();
Pin->PinType = NewPinType;
//break bad links
for(TArray<class UEdGraphPin*>::TIterator OtherPinIt(BadLinks);OtherPinIt;)
{
Pin->BreakLinkTo(*OtherPinIt);
}
}
return FReply::Handled();
}
}
return FReply::Unhandled();
}
开发者ID:RandomDeveloperM,项目名称:UE4_Hairworks,代码行数:56,代码来源:BPVariableDragDropAction.cpp
示例14: SerializeCDOProperties
void FHotReloadClassReinstancer::SetupNewClassReinstancing(UClass* InNewClass, UClass* InOldClass)
{
// Set base class members to valid values
ClassToReinstance = InNewClass;
DuplicatedClass = InOldClass;
OriginalCDO = InOldClass->GetDefaultObject();
bHasReinstanced = false;
bSkipGarbageCollection = false;
bNeedsReinstancing = true;
NewClass = InNewClass;
// Collect the original CDO property values
SerializeCDOProperties(InOldClass->GetDefaultObject(), OriginalCDOProperties);
// Collect the property values of the new CDO
SerializeCDOProperties(InNewClass->GetDefaultObject(), ReconstructedCDOProperties);
SaveClassFieldMapping(InOldClass);
ObjectsThatShouldUseOldStuff.Add(InOldClass); //CDO of REINST_ class can be used as archetype
TArray<UClass*> ChildrenOfClass;
GetDerivedClasses(InOldClass, ChildrenOfClass);
for (auto ClassIt = ChildrenOfClass.CreateConstIterator(); ClassIt; ++ClassIt)
{
UClass* ChildClass = *ClassIt;
UBlueprint* ChildBP = Cast<UBlueprint>(ChildClass->ClassGeneratedBy);
if (ChildBP && !ChildBP->HasAnyFlags(RF_BeingRegenerated))
{
// If this is a direct child, change the parent and relink so the property chain is valid for reinstancing
if (!ChildBP->HasAnyFlags(RF_NeedLoad))
{
if (ChildClass->GetSuperClass() == InOldClass)
{
ReparentChild(ChildBP);
}
Children.AddUnique(ChildBP);
if (ChildBP->ParentClass == InOldClass)
{
ChildBP->ParentClass = NewClass;
}
}
else
{
// If this is a child that caused the load of their parent, relink to the REINST class so that we can still serialize in the CDO, but do not add to later processing
ReparentChild(ChildClass);
}
}
}
// Finally, remove the old class from Root so that it can get GC'd and mark it as CLASS_NewerVersionExists
InOldClass->RemoveFromRoot();
InOldClass->ClassFlags |= CLASS_NewerVersionExists;
}
开发者ID:ErwinT6,项目名称:T6Engine,代码行数:54,代码来源:HotReloadClassReinstancer.cpp
示例15: LOCTEXT
//------------------------------------------------------------------------------
FText SBlueprintLibraryPalette::GetFilterClassName() const
{
FText FilterDisplayString = LOCTEXT("All", "All");
if (FilterClass != NULL)
{
UBlueprint* Blueprint = UBlueprint::GetBlueprintFromClass(FilterClass.Get());
FilterDisplayString = FText::FromString((Blueprint != NULL) ? Blueprint->GetName() : FilterClass->GetName());
}
return FilterDisplayString;
}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:12,代码来源:SBlueprintLibraryPalette.cpp
示例16: GetBlueprint
void UK2Node::Message_Warn(const FString& Message)
{
UBlueprint* OwningBP = GetBlueprint();
if( OwningBP )
{
OwningBP->Message_Warn(Message);
}
else
{
UE_LOG(LogBlueprint, Warning, TEXT("%s"), *Message);
}
}
开发者ID:mysheng8,项目名称:UnrealEngine,代码行数:12,代码来源:K2Node.cpp
示例17: GetClassDisplayName
/** Util to give better names for BP generated classes */
static FString GetClassDisplayName(const UObject* Object)
{
const UClass* Class = Cast<UClass>(Object);
if (Class != NULL)
{
UBlueprint* BP = UBlueprint::GetBlueprintFromClass(Class);
if(BP != NULL)
{
return BP->GetName();
}
}
return (Object) ? Object->GetName() : "None";
}
开发者ID:Art1stical,项目名称:AHRUnrealEngine,代码行数:14,代码来源:SPropertyEditorClass.cpp
示例18: 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
示例19: GetObjectsWithOuter
void UGatherTextFromAssetsCommandlet::ProcessPackages( const TArray< UPackage* >& PackagesToProcess )
{
for( int32 i = 0; i < PackagesToProcess.Num(); ++i )
{
UPackage* Package = PackagesToProcess[i];
TArray<UObject*> Objects;
GetObjectsWithOuter(Package, Objects);
for( int32 j = 0; j < Objects.Num(); ++j )
{
UObject* Object = Objects[j];
if ( Object->IsA( UBlueprint::StaticClass() ) )
{
UBlueprint* Blueprint = Cast<UBlueprint>( Object );
if( Blueprint->GeneratedClass != NULL )
{
ProcessObject( Blueprint->GeneratedClass->GetDefaultObject(), Package );
}
else
{
UE_LOG(LogGatherTextFromAssetsCommandlet, Warning, TEXT("%s - Invalid generated class!"), *Blueprint->GetFullName());
}
}
else if( Object->IsA( UDialogueWave::StaticClass() ) )
{
UDialogueWave* DialogueWave = Cast<UDialogueWave>( Object );
ProcessDialogueWave( DialogueWave );
}
ProcessObject( Object, Package );
}
}
}
开发者ID:Tigrouzen,项目名称:UnrealEngine-4,代码行数:34,代码来源:GatherTextFromAssetsCommandlet.cpp
示例20: ReconstructNode
void UK2Node_Select::NodeConnectionListChanged()
{
Super::NodeConnectionListChanged();
if (bReconstructNode)
{
ReconstructNode();
UBlueprint* Blueprint = GetBlueprint();
if(!Blueprint->bBeingCompiled)
{
FBlueprintEditorUtils::MarkBlueprintAsModified(Blueprint);
Blueprint->BroadcastChanged();
}
}
}
开发者ID:johndpope,项目名称:UE4,代码行数:16,代码来源:K2Node_Select.cpp
注:本文中的UBlueprint类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论