Skip to content

USMAssetExporterJson

Module: SMAssetTools

Inherits from USMAssetExporter

Public Functions

Name
virtual EExportStatus OnBeginExport(const FExportArgs & InExportArgs) override
virtual EExportStatus OnExportCDO(const UObject * InCDO) override
virtual EExportStatus OnExportNode(const UEdGraphNode * InGraphNode) override
virtual void OnFinishExport(USMBlueprint * InBlueprint, EExportStatus InStatus) override
TSharedPtr< FJsonObject > GetExportedJsonObject() const
EExportStatus GraphNodeToJsonValue(const UEdGraphNode * InGraphNode, TSharedPtr< FJsonValueObject > & OutJsonValue)

Protected Functions

Name
TSharedPtr< FJsonObject > CreateJsonObject(const UObject * InObject)
TSharedPtr< FJsonValueObject > CreateJsonValueObject(const UObject * InObject)
void CleanupJsonObject(TSharedPtr< FJsonObject > JsonObject)
TSharedPtr< FJsonValue > OnExportJsonProperty(FProperty * InProperty, const void * Value, const UObject * OwningObject)

Protected Attributes

Name
TSharedPtr< FJsonObject > RootJsonObject
TArray< TSharedPtr< FJsonValue > > StateJsonArray
TArray< TSharedPtr< FJsonValue > > TransitionJsonArray
TArray< TSharedPtr< FJsonValue > > EntryJsonArray
TArray< TSharedPtr< FJsonValue > > CommentJsonArray
FExportArgs ExportArgs

Public Functions Documentation

function OnBeginExport

virtual EExportStatus OnBeginExport(
    const FExportArgs & InExportArgs
) override

function OnExportCDO

virtual EExportStatus OnExportCDO(
    const UObject * InCDO
) override

function OnExportNode

virtual EExportStatus OnExportNode(
    const UEdGraphNode * InGraphNode
) override

function OnFinishExport

virtual void OnFinishExport(
    USMBlueprint * InBlueprint,
    EExportStatus InStatus
) override

function GetExportedJsonObject

inline TSharedPtr< FJsonObject > GetExportedJsonObject() const

Return the exported json object. Only complete during OnFinishExport.


function GraphNodeToJsonValue

static EExportStatus GraphNodeToJsonValue(
    const UEdGraphNode * InGraphNode,
    TSharedPtr< FJsonValueObject > & OutJsonValue
)

Convert a USMGraphNode_Base to a json object.


Protected Functions Documentation

function CreateJsonObject

static TSharedPtr< FJsonObject > CreateJsonObject(
    const UObject * InObject
)

function CreateJsonValueObject

static TSharedPtr< FJsonValueObject > CreateJsonValueObject(
    const UObject * InObject
)

function CleanupJsonObject

static void CleanupJsonObject(
    TSharedPtr< FJsonObject > JsonObject
)

Remove any properties that aren't meant to be serialized.


function OnExportJsonProperty

static TSharedPtr< FJsonValue > OnExportJsonProperty(
    FProperty * InProperty,
    const void * Value,
    const UObject * OwningObject
)

Called during json object export.


Protected Attributes Documentation

variable RootJsonObject

TSharedPtr< FJsonObject > RootJsonObject;

variable StateJsonArray

TArray< TSharedPtr< FJsonValue > > StateJsonArray;

variable TransitionJsonArray

TArray< TSharedPtr< FJsonValue > > TransitionJsonArray;

variable EntryJsonArray

TArray< TSharedPtr< FJsonValue > > EntryJsonArray;

variable CommentJsonArray

TArray< TSharedPtr< FJsonValue > > CommentJsonArray;

variable ExportArgs

FExportArgs ExportArgs;