You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#jira UE-117132 #jira UE-117332 #jira UE-117327 #jira UE-117329 #rb marc.audy #rnx #preflight 60d48296925f1400010bb909 #ROBOMERGE-SOURCE: CL 16773601 in //UE5/Main/... #ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v836-16769935) [CL 16773618 by ben hoffman in ue5-release-engine-test branch]
59 lines
1.5 KiB
C++
59 lines
1.5 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "InheritedSubobjectData.h"
|
|
#include "Kismet2/ComponentEditorUtils.h"
|
|
|
|
FInheritedSubobjectData::FInheritedSubobjectData(UObject* ContextObject, const FSubobjectDataHandle& ParentHandle, const bool InbIsInheritedSCS)
|
|
: FSubobjectData(ContextObject, ParentHandle)
|
|
, bIsInheritedSCS(InbIsInheritedSCS)
|
|
{
|
|
}
|
|
|
|
bool FInheritedSubobjectData::IsNativeComponent() const
|
|
{
|
|
if (const UActorComponent* Template = GetComponentTemplate())
|
|
{
|
|
return Template->CreationMethod == EComponentCreationMethod::Native && GetSCSNode() == nullptr;
|
|
}
|
|
|
|
return false;
|
|
}
|
|
|
|
bool FInheritedSubobjectData::CanEdit() const
|
|
{
|
|
if(IsComponent())
|
|
{
|
|
if(IsInstancedInheritedComponent())
|
|
{
|
|
const UActorComponent* Template = GetComponentTemplate();
|
|
return (Template ? Template->IsEditableWhenInherited() : false);
|
|
}
|
|
else if (!IsNativeComponent())
|
|
{
|
|
USCS_Node* SCS_Node = GetSCSNode();
|
|
return (SCS_Node != nullptr);
|
|
}
|
|
else if (const UActorComponent* ComponentTemplate = GetComponentTemplate())
|
|
{
|
|
return FComponentEditorUtils::GetPropertyForEditableNativeComponent(ComponentTemplate) != nullptr;
|
|
}
|
|
}
|
|
|
|
return FSubobjectData::CanEdit();
|
|
}
|
|
|
|
bool FInheritedSubobjectData::CanDelete() const
|
|
{
|
|
if(IsInheritedComponent() || IsDefaultSceneRoot() || (GetSCSNode() != nullptr && IsInstancedInheritedComponent()) || IsChildActorSubtreeObject())
|
|
{
|
|
return false;
|
|
}
|
|
|
|
return true;
|
|
}
|
|
|
|
bool FInheritedSubobjectData::IsInheritedSCSNode() const
|
|
{
|
|
return bIsInheritedSCS;
|
|
}
|