ArticyXImporter
ArticyXImporter for Unreal Engine
Loading...
Searching...
No Matches
FArticyObjectDef Struct Reference

#include <ObjectDefinitionsImport.h>

Public Member Functions

void ImportFromJson (const TSharedPtr< FJsonObject > JsonObjDef, const UArticyImportData *Data)
bool IsBaseProperty (FName Property, const UArticyImportData *Data) const
void GenerateCode (CodeFileGenerator &header, const UArticyImportData *Data) const
void GatherScripts (const FArticyModelDef &Values, UArticyImportData *Data) const
void InitializeModel (UArticyPrimitive *Model, const FArticyModelDef &Values, const UArticyImportData *Data, const FString &PackageName) const
FString GetCppType (const UArticyImportData *Data, const bool bForProperty) const
FString GetCppBaseClasses (const UArticyImportData *Data) const
const FName & GetOriginalType () const
const TArray< FArticyTemplateFeatureDef > & GetFeatures () const

Public Attributes

FArticyType ArticyType

Detailed Description

Represents an object definition in Articy.

Member Function Documentation

◆ GatherScripts()

void FArticyObjectDef::GatherScripts ( const FArticyModelDef & Vals,
UArticyImportData * Data ) const

Find all script fragments, add them to the UArticyImportData, and replace them with an id.

Parameters
ValuesThe model definition containing the values.
DataA pointer to the UArticyImportData object.

Gather scripts from model definition and adds them to the UArticyImportData.

Parameters
ValsThe model definition containing the values.
DataA pointer to the UArticyImportData object.

◆ GenerateCode()

void FArticyObjectDef::GenerateCode ( CodeFileGenerator & header,
const UArticyImportData * Data ) const

Generates code for the object definition using CodeFileGenerator.

Parameters
headerA reference to the CodeFileGenerator.
DataA pointer to the UArticyImportData object.

◆ GetCppBaseClasses()

FString FArticyObjectDef::GetCppBaseClasses ( const UArticyImportData * Data) const

Returns the C++ base classes of the object definition.

Parameters
DataA pointer to the UArticyImportData object.
Returns
The C++ base classes as a string.

◆ GetCppType()

FString FArticyObjectDef::GetCppType ( const UArticyImportData * Data,
const bool bForProperty ) const

Returns the C++ type of the object definition.

Parameters
DataA pointer to the UArticyImportData object.
bForPropertyWhether the type is for a property.
Returns
The C++ type as a string.

◆ GetFeatures()

const TArray< FArticyTemplateFeatureDef > & FArticyObjectDef::GetFeatures ( ) const

Returns the features of the object definition.

Returns
A constant reference to the array of features.

◆ GetOriginalType()

const FName & FArticyObjectDef::GetOriginalType ( ) const
inline

Returns the original type of the object definition.

Returns
The original type as an FName.

◆ ImportFromJson()

void FArticyObjectDef::ImportFromJson ( const TSharedPtr< FJsonObject > JsonObjDef,
const UArticyImportData * Data )

Imports object definition data from a JSON object.

Parameters
JsonObjDefA shared pointer to the JSON object containing the object definition.
DataA pointer to the UArticyImportData object.

◆ InitializeModel()

void FArticyObjectDef::InitializeModel ( UArticyPrimitive * Model,
const FArticyModelDef & Vals,
const UArticyImportData * Data,
const FString & PackageName ) const

Initializes a model with data from the model definition.

Parameters
ModelA pointer to the UArticyPrimitive object.
ValuesThe model definition containing the values.
DataA pointer to the UArticyImportData object.
PackageNameThe name of the package.

Initializes a model with data from the model definition.

Parameters
ModelA pointer to the UArticyPrimitive object.
ValsThe model definition containing the values.
DataA pointer to the UArticyImportData object.
PackageNameThe name of the package.

◆ IsBaseProperty()

bool FArticyObjectDef::IsBaseProperty ( FName Property,
const UArticyImportData * Data ) const

Checks if a property is already defined in the base class.

Parameters
PropertyThe name of the property.
DataA pointer to the UArticyImportData object.
Returns
True if the property is a base property, false otherwise.

The documentation for this struct was generated from the following files: