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

#include <ObjectDefinitionsImport.h>

Classes

struct  FClassInfo

Public Member Functions

void ImportFromJson (const TArray< TSharedPtr< FJsonValue > > *Json, const UArticyImportData *Data)
void GatherScripts (const FArticyModelDef &Values, UArticyImportData *Data) const
void GatherText (const TSharedPtr< FJsonObject > &Json)
void InitializeModel (UArticyPrimitive *Model, const FArticyModelDef &Values, const UArticyImportData *Data, const FString &PackageName) const
FString GetCppType (const FName &OriginalType, const UArticyImportData *Data, const bool bForProperty) const
bool IsNewFeatureType (const FName &CppType) const
TMap< FName, FArticyObjectDef > & GetTypes ()
const TMap< FName, FArticyObjectDef > & GetTypes () const
TMap< FString, FArticyTexts > & GetTexts ()
const TMap< FString, FArticyTexts > & GetTexts () const
const TMap< FName, FArticyTemplateFeatureDefGetFeatures () const

Static Public Member Functions

static const FString & GetCppDefaultValue (const FName &OriginalType)
static const FClassInfoGetDefaultBaseClass (const FName &OriginalType, const UArticyImportData *Data)
static const FName & GetProviderInterface (const FArticyPropertyDef &Property)
static void SetProp (const FName &OriginalType, const FName &Property, PROP_SETTER_PARAMS)

Detailed Description

Represents object definitions in Articy.

Member Function Documentation

◆ GatherScripts()

void FArticyObjectDefinitions::GatherScripts ( const FArticyModelDef & Values,
UArticyImportData * Data ) const

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

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

◆ GatherText()

void FArticyObjectDefinitions::GatherText ( const TSharedPtr< FJsonObject > & Json)

Gather text definitions from a JSON object.

Parameters
JsonA shared pointer to the JSON object containing the text definitions.

◆ GetCppDefaultValue()

const FString & FArticyObjectDefinitions::GetCppDefaultValue ( const FName & OriginalType)
static

Returns the default C++ value for a given type.

Parameters
OriginalTypeThe original type.
Returns
The default value as a string.

◆ GetCppType()

FString FArticyObjectDefinitions::GetCppType ( const FName & OriginalType,
const UArticyImportData * Data,
const bool bForProperty ) const

Returns the C++ type of an object definition.

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

◆ GetDefaultBaseClass()

const FArticyObjectDefinitions::FClassInfo & FArticyObjectDefinitions::GetDefaultBaseClass ( const FName & OriginalType,
const UArticyImportData * Data )
static

Returns the default base class for an object definition.

Parameters
OriginalTypeThe original type of the object definition.
DataA pointer to the UArticyImportData object.
Returns
A reference to the FClassInfo struct containing the base class information.

◆ GetFeatures()

const TMap< FName, FArticyTemplateFeatureDef > FArticyObjectDefinitions::GetFeatures ( ) const
inline

Returns the feature definitions map.

Returns
A constant reference to the feature definitions map.

◆ GetProviderInterface()

const FName & FArticyObjectDefinitions::GetProviderInterface ( const FArticyPropertyDef & Property)
static

Returns the provider interface name for a given property.

Parameters
PropertyThe property definition.
Returns
The provider interface name as an FName.

◆ GetTexts() [1/2]

TMap< FString, FArticyTexts > & FArticyObjectDefinitions::GetTexts ( )
inline

Returns the texts map.

Returns
A reference to the texts map.

◆ GetTexts() [2/2]

const TMap< FString, FArticyTexts > & FArticyObjectDefinitions::GetTexts ( ) const
inline

Returns the texts map.

Returns
A constant reference to the texts map.

◆ GetTypes() [1/2]

TMap< FName, FArticyObjectDef > & FArticyObjectDefinitions::GetTypes ( )
inline

Returns the types map.

Returns
A reference to the types map.

◆ GetTypes() [2/2]

const TMap< FName, FArticyObjectDef > & FArticyObjectDefinitions::GetTypes ( ) const
inline

Returns the types map.

Returns
A constant reference to the types map.

◆ ImportFromJson()

void FArticyObjectDefinitions::ImportFromJson ( const TArray< TSharedPtr< FJsonValue > > * Json,
const UArticyImportData * Data )

Imports object definitions from a JSON array.

Parameters
JsonA pointer to the array of JSON values containing the object definitions.
DataA pointer to the UArticyImportData object.

◆ InitializeModel()

void FArticyObjectDefinitions::InitializeModel ( UArticyPrimitive * Model,
const FArticyModelDef & Values,
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.

◆ IsNewFeatureType()

bool FArticyObjectDefinitions::IsNewFeatureType ( const FName & CppType) const

Checks if a feature type is new.

Parameters
CppTypeThe C++ type of the feature.
Returns
True if the feature type is new, false otherwise.

◆ SetProp()

void FArticyObjectDefinitions::SetProp ( const FName & OriginalType,
const FName & Property,
PROP_SETTER_PARAMS  )
static

Sets a property value on a model.

Parameters
OriginalTypeThe original type of the property.
PropertyThe name of the property.
PROP_SETTER_PARAMSParameters for setting the property.

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