More work on properties of components
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
#include "WingServer.h"
|
||||
#include "WingTypes.h"
|
||||
#include "Engine/Blueprint.h"
|
||||
#include "Engine/SCS_Node.h"
|
||||
#include "MaterialGraph/MaterialGraphNode.h"
|
||||
#include "EdGraph/EdGraphPin.h"
|
||||
#include "UObject/EnumProperty.h"
|
||||
@@ -138,6 +139,19 @@ TArray<FWingProperty> FWingProperty::GetAll(UObject* Obj, EPropertyFlags Flags)
|
||||
Obj = BP->GeneratedClass->GetDefaultObject();
|
||||
}
|
||||
|
||||
// SCS nodes don't have useful editable properties.
|
||||
// Redirect to the component template instead.
|
||||
//
|
||||
if (USCS_Node* Node = ::Cast<USCS_Node>(Obj))
|
||||
{
|
||||
if (!Node->ComponentTemplate)
|
||||
{
|
||||
UWingServer::Printf(TEXT("ERROR: SCS node '%s' has no component template\n"), *Obj->GetName());
|
||||
return {};
|
||||
}
|
||||
Obj = Node->ComponentTemplate;
|
||||
}
|
||||
|
||||
TArray<FWingProperty> Result;
|
||||
Collect(Obj->GetClass(), Obj, Result, Flags);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user