You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
36 lines
1.2 KiB
C++
36 lines
1.2 KiB
C++
|
|
// Copyright 1998-2014 Epic Games, Inc. All Rights Reserved.
|
||
|
|
|
||
|
|
|
||
|
|
#include "PropertyEditorPrivatePCH.h"
|
||
|
|
#include "PropertyNode.h"
|
||
|
|
#include "CategoryPropertyNode.h"
|
||
|
|
#include "ItemPropertyNode.h"
|
||
|
|
#include "ObjectEditorUtils.h"
|
||
|
|
#include "StructurePropertyNode.h"
|
||
|
|
|
||
|
|
void FStructurePropertyNode::InitChildNodes()
|
||
|
|
{
|
||
|
|
const bool bShouldShowHiddenProperties = !!HasNodeFlags(EPropertyNodeFlags::ShouldShowHiddenProperties);
|
||
|
|
const UScriptStruct* Struct = StructData.IsValid() ? StructData->GetStruct() : NULL;
|
||
|
|
|
||
|
|
for (TFieldIterator<UProperty> It(Struct); It; ++It)
|
||
|
|
{
|
||
|
|
UProperty* StructMember = *It;
|
||
|
|
if (StructMember && (bShouldShowHiddenProperties || (StructMember->PropertyFlags & CPF_Edit)))
|
||
|
|
{
|
||
|
|
TSharedPtr<FItemPropertyNode> NewItemNode(new FItemPropertyNode);//;//CreatePropertyItem(StructMember,INDEX_NONE,this);
|
||
|
|
|
||
|
|
FPropertyNodeInitParams InitParams;
|
||
|
|
InitParams.ParentNode = SharedThis(this);
|
||
|
|
InitParams.Property = StructMember;
|
||
|
|
InitParams.ArrayOffset = 0;
|
||
|
|
InitParams.ArrayIndex = INDEX_NONE;
|
||
|
|
InitParams.bAllowChildren = true;
|
||
|
|
InitParams.bForceHiddenPropertyVisibility = !!HasNodeFlags(EPropertyNodeFlags::ShouldShowHiddenProperties);
|
||
|
|
InitParams.bCreateCategoryNodes = false;
|
||
|
|
|
||
|
|
NewItemNode->InitNode(InitParams);
|
||
|
|
AddChildNode(NewItemNode);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|