You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Added new blackboard view based on MyBlueprint. Class viewer can now optionally display "Display Names" for classes (this is used to make the names of blackboard entries more friendly). SPropertyEditorEditInline now displays the class type icon as well as its name. Blackboard entry details customization now hides the header for entries, so one level of expansion is no longer necessary. Removed pointer to 'view' in the blackboard debugger & replaced with delegates where appropriate. Fixed crash issue also mentioned here: https://github.com/EpicGames/UnrealEngine/pull/212 Added new detail customization used to display only the selected entry in the current blackboard. Fixed crash when running services with no Blackboard (prevent access of NULL blackboard component). TTP# 337669 - Behaviour Tree Editor: Integrate Blackboard debugging display with Blackboard Editor reviewed by Andrew.Brown, Lukasz.Furman [CL 2113798 by Thomas Sarkanen in Main branch]
90 lines
2.7 KiB
C++
90 lines
2.7 KiB
C++
// Copyright 1998-2014 Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "ClassViewerPrivatePCH.h"
|
|
|
|
#include "ClassViewerNode.h"
|
|
#include "ClassViewerFilter.h"
|
|
#include "PropertyEditorModule.h"
|
|
#include "PropertyHandle.h"
|
|
|
|
FClassViewerNode::FClassViewerNode( const FString& InClassName, const FString& InClassDisplayName, bool bInIsPlaceable )
|
|
{
|
|
ClassName = MakeShareable(new FString(InClassName));
|
|
ClassDisplayName = MakeShareable(new FString(InClassDisplayName));
|
|
bPassesFilter = false;
|
|
bIsClassPlaceable = bInIsPlaceable;
|
|
bIsBPNormalType = false;
|
|
|
|
Class = NULL;
|
|
Blueprint = NULL;
|
|
}
|
|
|
|
FClassViewerNode::FClassViewerNode( const FClassViewerNode& InCopyObject)
|
|
{
|
|
ClassName = InCopyObject.ClassName;
|
|
ClassDisplayName = InCopyObject.ClassDisplayName;
|
|
bPassesFilter = InCopyObject.bPassesFilter;
|
|
bIsClassPlaceable = InCopyObject.bIsClassPlaceable;
|
|
|
|
Class = InCopyObject.Class;
|
|
Blueprint = InCopyObject.Blueprint;
|
|
|
|
UnloadedBlueprintData = InCopyObject.UnloadedBlueprintData;
|
|
|
|
GeneratedClassPackage = InCopyObject.GeneratedClassPackage;
|
|
GeneratedClassname = InCopyObject.GeneratedClassname;
|
|
ParentClassname = InCopyObject.ParentClassname;
|
|
ClassName = InCopyObject.ClassName;
|
|
AssetName = InCopyObject.AssetName;
|
|
bIsBPNormalType = InCopyObject.bIsBPNormalType;
|
|
|
|
// We do not want to copy the child list, do not add it. It should be the only item missing.
|
|
}
|
|
|
|
/**
|
|
* Adds the specified child to the node.
|
|
*
|
|
* @param Child The child to be added to this node for the tree.
|
|
*/
|
|
void FClassViewerNode::AddChild( TSharedPtr<FClassViewerNode> Child )
|
|
{
|
|
check(Child.IsValid());
|
|
ChildrenList.Add(Child);
|
|
}
|
|
|
|
void FClassViewerNode::AddUniqueChild(TSharedPtr<FClassViewerNode> NewChild)
|
|
{
|
|
check(NewChild.IsValid());
|
|
const UClass* NewChildClass = NewChild->Class.Get();
|
|
if(NULL != NewChildClass)
|
|
{
|
|
for(int ChildIndex = 0; ChildIndex < ChildrenList.Num(); ++ChildIndex)
|
|
{
|
|
TSharedPtr<FClassViewerNode> OldChild = ChildrenList[ChildIndex];
|
|
if(OldChild.IsValid() && OldChild->Class == NewChildClass)
|
|
{
|
|
const bool bNewChildHasMoreInfo = NewChild->UnloadedBlueprintData.IsValid();
|
|
const bool bOldChildHasMoreInfo = OldChild->UnloadedBlueprintData.IsValid();
|
|
if(bNewChildHasMoreInfo && !bOldChildHasMoreInfo)
|
|
{
|
|
// make sure, that new child has all needed children
|
|
for(int OldChildIndex = 0; OldChildIndex < OldChild->ChildrenList.Num(); ++OldChildIndex)
|
|
{
|
|
NewChild->AddUniqueChild( OldChild->ChildrenList[OldChildIndex] );
|
|
}
|
|
|
|
// replace child
|
|
ChildrenList[ChildIndex] = NewChild;
|
|
}
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
|
|
AddChild(NewChild);
|
|
}
|
|
|
|
bool FClassViewerNode::IsRestricted() const
|
|
{
|
|
return PropertyHandle.IsValid() && PropertyHandle->IsRestricted(*ClassName);
|
|
} |