unreal.DataprepOperation

class unreal.DataprepOperation(outer: Optional[Object] = None, name: Union[Name, str] = 'None')

Bases: DataprepParameterizableObject

Base class for all Dataprep operations Dataprep operations act on a set of input obejcts and can modify their properties: f.e. change materials, add metadata etc.

C++ Source:

  • Plugin: DataprepEditor

  • Module: DataprepCore

  • File: DataprepOperation.h

assets_modified(assets) None

Indicates an array of assets has changed during the operation. It is important to use this function if the modifications on the assets impact their appearance

Parameters:

assets (Array[Object]) – Array of assets which have been modified

begin_work(description, amount_of_work) None

Indicates the beginning of a new work to report on

Parameters:
  • description (Text) – Text describing the work about to begin

  • amount_of_work (float) – Expected total amount of work

end_work() None

Indicates the end of the work

execute(objects) None

Execute the operation

Parameters:

objects (Array[Object]) – The objects that the operation will operate on

get_additional_keyword() Text

Allows to add more keywords for when a user is searching for the fetcher in the ui.

Return type:

Text

get_category() Text

Allows to change the tooltip of the fetcher for the ui if needed.

Return type:

Text

get_display_operation_name() Text

Allows to change the name of the fetcher for the ui if needed.

Return type:

Text

get_tooltip() Text

Allows to change the tooltip of the fetcher for the ui if needed.

Return type:

Text

log_error(log_error) None

Add Error to the log

Parameters:

log_error (Text) –

log_info(log_text) None

Add an info to the log

Parameters:

log_text (Text) – The text to add to the log

log_warning(log_text) None

Add a warning to the log

Parameters:

log_text (Text) – The text to add to the log

on_execution(context) None

This function is called when the operation is executed. If your defining your operation in Blueprint or Python this is the function to override.

Parameters:

context (DataprepContext) – The context contains the data that the operation should operate on.

report_progress(increment_of_work, message) None

Report foreseen progress on the current work

Parameters:
  • increment_of_work (float) – Amount of progress foreseen until the next call

  • message (Text) – Message to be displayed along side the reported progress