unreal.EditorDataprepAssetLibrary
¶
- class unreal.EditorDataprepAssetLibrary(outer: Object | None = None, name: Name | str = 'None')¶
Bases:
BlueprintFunctionLibrary
Utility class to do most expose most of the common functionalities of the dataprep editor plugin (Visual Dataprep).
A Dataprep asset is composed of tree main parts: a array of producers, a recipe and a consumer.
The producers are the objects that manage the logistic of importing the data into the dataprep context For example, a DatasmithFileProducer is an object that can import the data from a file using the datasmith importer
The recipe is a series of DataprepActions. Each action is generally compose of a filter(s) and an operation(s) We refer those as the steps of action. The typical action consist in filtering the dataprep context to get a subset objects and passing those to some operations. Each action receive the full context from the scene and the asset loaded into the dataprep environment.
The consumer is the object that receive the dataprep environment and turns it into something useful and not transient. Currently, the only type of consumer supported is the DatasmithConsumer. It take the dataprep environment and import it into the engine in similar fashion to a standard datasmith import.
More on the dataprep action asset: Each step of dataprep action are a descendant of the type UDataprepParameterizableObject. When setting the value of variables on those objects prefer using the SetEditorProperty utility function as the parameterization of the dataprep asset depends on certain editor calls to stay in sync with the recipe.
C++ Source:
Plugin: DataprepEditor
Module: DataprepEditorScriptingUtilities
File: EditorDataprepAssetLibrary.h
- classmethod add_action(dataprep_asset) DataprepActionAsset ¶
Add an action to a dataprep asset note: the action is added at the end of the action list
- Parameters:
dataprep_asset (DataprepAsset) – The dataprep asset to which the action will added
- Returns:
the new action
- Return type:
- classmethod add_action_by_duplication(dataprep_asset, action_to_duplicate) DataprepActionAsset ¶
Add an action to a dataprep asset note: the action is added at the end of the action list
- Parameters:
dataprep_asset (DataprepAsset) – The dataprep asset to which the action will added
action_to_duplicate (DataprepActionAsset) – The action that will be duplicated
- Returns:
the new action
- Return type:
- classmethod add_producer(dataprep_asset_interface, producer_class) DataprepContentProducer ¶
Add a producer to a dataprep asset (The producer will act as if was call from the dataprep editor, use the automated version if you don’t want any ui)
- Parameters:
dataprep_asset_interface (DataprepAssetInterface) – The dataprep asset on which the producer will be added.
- Returns:
The created producer
- Return type:
- classmethod add_producer_automated(dataprep_asset_interface, producer_class) DataprepContentProducer ¶
Add a producer to a dataprep asset
- Parameters:
dataprep_asset_interface (DataprepAssetInterface) – The dataprep asset on which the producer will be added.
- Returns:
The created producer
- Return type:
- classmethod add_step(dataprep_action, step_type) DataprepParameterizableObject ¶
Add a step to a dataprep action
- Parameters:
dataprep_action (DataprepActionAsset) – The dataprep action on which the step will be added
step_type (type(Class)) – The type of the step we want to add. It can be a fetcher (for the filters) or a operation.z
- Returns:
The object of the new step
- Return type:
- classmethod add_step_by_duplication(dataprep_action, step_object) DataprepParameterizableObject ¶
Add a step to a dataprep action by duplicating the step object
- Parameters:
dataprep_action (DataprepActionAsset) – The dataprep action on which the step will be added
step_object (DataprepParameterizableObject) – The step that will be duplicated into the action
- Returns:
The object of the new step
- Return type:
- classmethod execute_dataprep(dataprep_asset_interface, log_reporting_method, progress_reporting_method) bool ¶
Runs the Dataprep asset’s producers, execute its recipe and finally runs the consumer to output the results.
- Parameters:
dataprep_asset_interface (DataprepAssetInterface) – Dataprep asset to run.
log_reporting_method (DataprepReportMethod) – Chose the way the log from the producers, operations and consumer will be reported (this will only affect the log from dataprep).
progress_reporting_method (DataprepReportMethod) – The way that the progress updates will be reported.
- Returns:
True if successful.
- Return type:
- classmethod get_action(dataprep_asset, index) DataprepActionAsset ¶
Get an action from a dataprep asset.
- Parameters:
dataprep_asset (DataprepAsset) – The dataprep asset from which the action will be retrieved
index (int32) – The index of the action in the dataprep asset
- Return type:
- classmethod get_action_count(dataprep_asset) int32 ¶
Get number of actions of a dataprep asset
- Parameters:
dataprep_asset (DataprepAsset) – The dataprep asset from which to get the number of action
- Returns:
The number of actions of a dataprep asset
- Return type:
int32
- classmethod get_consumer(dataprep_asset_interface) DataprepContentConsumer ¶
Access the consumer of a dataprep asset
- Parameters:
dataprep_asset_interface (DataprepAssetInterface) – The dataprep asset from which the consumer retrieved
- Return type:
- classmethod get_producer(dataprep_asset_interface, index) DataprepContentProducer ¶
Get a producer from a dataprep asset.
- Parameters:
dataprep_asset_interface (DataprepAssetInterface) – The dataprep asset from which the producer will be retrieved
index (int32) – The index of the producer in the dataprep asset
- Return type:
- classmethod get_producers_count(dataprep_asset_interface) int32 ¶
Get number of the producer of a dataprep asset
- Parameters:
dataprep_asset_interface (DataprepAssetInterface) – The dataprep asset from which to get the number of producer
- Returns:
The number of producers of a dataprep asset
- Return type:
int32
- classmethod get_step_object(dataprep_action, index) DataprepParameterizableObject ¶
Return the object of a step from the dataprep action
- Parameters:
dataprep_action (DataprepActionAsset) – The dataprep action on which the step object will retrieve
index (int32) – The index of the step
- Returns:
The retrieved step object (Generally a dataprep operation or filter)
- Return type:
- classmethod get_steps_count(dataprep_action) int32 ¶
Get the number of steps for a dataprep action
- Parameters:
dataprep_action (DataprepActionAsset) – The dataprep action from which we will count the number steps
- Returns:
The number of steps the dataprep action
- Return type:
int32
- classmethod move_step(dataprep_action, step_index, destination_index) None ¶
Move a step of the dataprep action
- Parameters:
dataprep_action (DataprepActionAsset) – The dataprep action on which a step will be moved
step_index (int32) – The index of the step to move
destination_index (int32) – The index where the step will be moved
- classmethod remove_action(dataprep_asset, index) None ¶
Remove an action from a dataprep asset
- Parameters:
dataprep_asset (DataprepAsset) – The dataprep asset from which the action will be removed
index (int32) – Index of the action to remove
- classmethod remove_producer(dataprep_asset_interface, index) None ¶
Remove a producer from a dataprep asset
- Parameters:
dataprep_asset_interface (DataprepAssetInterface) – The dataprep asset from which the producer will be removed
index (int32) – Index of the producer to remove
- classmethod remove_step(dataprep_action, index) None ¶
Remove a step from the action
- Parameters:
dataprep_action (DataprepActionAsset) – The dataprep action from which we will remove the step
index (int32) – the index of the step to remove
- classmethod swap_actions(dataprep_asset, first_action_index, second_action_index) None ¶
Swap the actions of a dataprep asset
- Parameters:
dataprep_asset (DataprepAsset) – The dataprep asset on which the actions will swapped
first_action_index (int32) – The index of the first action
second_action_index (int32) – The index of the second action
- classmethod swap_steps(dataprep_action, first_index, second_index) None ¶
Swap the steps of a dataprep action
- Parameters:
dataprep_action (DataprepActionAsset) – The dataprep action on which the step will be swapped
first_index (int32) – The index of the first step
second_index (int32) – The index of the seconds step