unreal.Factory

class unreal.Factory(outer=None, name='None')

Bases: unreal.Object

Base class for all factories An object responsible for creating and importing new objects.

C++ Source:

  • Module: UnrealEd

  • File: Factory.h

Editor Properties: (see get_editor_property/set_editor_property)

  • asset_import_task (AssetImportTask): [Read-Write] Asset Import Task: Task for importing file via script interfaces

  • automated_import_data (AutomatedAssetImportData): [Read-Write] Automated Import Data: Data for how to import files via the automated command line importing interface

  • context_class (type(Class)): [Read-Write] Context Class: Class of the context object used to help create the object.

  • create_new (bool): [Read-Write] Create New: The default value to return from CanCreateNew()

  • edit_after_new (bool): [Read-Write] Edit After New: true if the associated editor should be opened after creating a new object.

  • editor_import (bool): [Read-Write] Editor Import: true if the factory imports objects from files.

  • formats (Array(str)): [Read-Write] Formats: List of formats supported by the factory. Each entry is of the form “ext;Description” where ext is the file extension.

  • supported_class (type(Class)): [Read-Write] Supported Class: The class manufactured by this factory.

  • text (bool): [Read-Write] Text: true if the factory imports objects from text.

property asset_import_task

[Read-Write] Asset Import Task: Task for importing file via script interfaces

Type

(AssetImportTask)

property automated_import_data

[Read-Write] Automated Import Data: Data for how to import files via the automated command line importing interface

Type

(AutomatedAssetImportData)

property context_class

[Read-Write] Context Class: Class of the context object used to help create the object.

Type

(type(Class))

property create_new

[Read-Write] Create New: The default value to return from CanCreateNew()

Type

(bool)

property edit_after_new

[Read-Write] Edit After New: true if the associated editor should be opened after creating a new object.

Type

(bool)

property editor_import

[Read-Write] Editor Import: true if the factory imports objects from files.

Type

(bool)

property formats

[Read-Write] Formats: List of formats supported by the factory. Each entry is of the form “ext;Description” where ext is the file extension.

Type

(Array(str))

script_factory_can_import(filename) bool

Whether the specified file can be imported by this factory. (Implemented in script)

Parameters

filename (str) –

Returns

true if the file is supported, false otherwise.

Return type

bool

script_factory_create_file(task) bool

Import object(s) using a task via script

Parameters

task (AssetImportTask) –

Returns

True if script implements

Return type

bool

property supported_class

[Read-Write] Supported Class: The class manufactured by this factory.

Type

(type(Class))

property text

[Read-Write] Text: true if the factory imports objects from text.

Type

(bool)