# Data Handler

A Render Results Screen Data Handler allows a user to create an automated task at the end of a render to process the render data in a way other than the Render Results Screen.

## Setting a Data Handler

The Data Handler class can be set in the Project Settings, along with an option to disable the Render Results Screen ([see here](/supported-assets/render-results-screen/how-to-use-5.2+/project-settings.md#automation)). When a render finishes in the Movie Render Queue, the data will be sent to this class to process in the user-defined way.

## Blueprints

To create a new Data Handler, right-click in the *Content Browser* or click **+Add**. Select **Blueprint Class**.&#x20;

<figure><img src="/files/g4pi9OKFpiFh7VpQitdp" alt=""><figcaption></figcaption></figure>

Under *All Classes* select **Osero Suite: Render Data Handler**.

<figure><img src="/files/fjIgPgm54fxWcoxmwEfL" alt=""><figcaption></figcaption></figure>

When the new Data Handler is opened, it will be empty.

<figure><img src="/files/WyKWIetznji4CLGjGoKw" alt=""><figcaption></figcaption></figure>

Under *FUNCTIONS*, click **Override** and select **Handle Data**.

<figure><img src="/files/HZZvJQz8gAmPwFhb7GKK" alt=""><figcaption></figcaption></figure>

This will add a new event to this Blueprint called **Handle Data**.

<figure><img src="/files/740KK14BLrErDNxTPBRH" alt=""><figcaption></figcaption></figure>

The Result Data pin can be split into the data from the render and used as required.

<figure><img src="/files/LMmYwDmZMkUNi0GP2EoR" alt=""><figcaption></figcaption></figure>

The Job Data struct can be split into the data from the Job and used as required.

<figure><img src="/files/ZYuDnszPfV5Mc2WZw8cf" alt=""><figcaption></figcaption></figure>

The Shot Data struct can be split into the data from the Shot and used as required.

<figure><img src="/files/CjlcntNOrjYrhcEzbUOe" alt=""><figcaption></figcaption></figure>

There also a number of functions available under the **Osero Suite: Render Results Screen** category to help with interpreting this data.

<figure><img src="/files/pzLymSTb1Qwx43yuuShO" alt=""><figcaption></figcaption></figure>

{% hint style="success" %}
Make sure to [set the **Data Export Class** in Project Settings](#setting-a-data-handler) to the newly created Blueprint class so that it can execute when renders are finished.
{% endhint %}

## C++

To create a new Data Handler, add a new C++ class of type `OS_RRS_DataHandler`.

<figure><img src="/files/DolDTzxVCZ2hhT7V8zfR" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
The Data Handler Class is in an Editor Module, and so the recommended place for a new Data Handler Class is in another Editor Module.
{% endhint %}

Add `Blutility`, `MovieRenderPipelineCore`, and `OS_RRS_Editor` to the Module's Build.cs file.

```csharp
PrivateDependencyModuleNames.AddRange(
	new string[]
	{
		...
		"Blutility",
		"MovieRenderPipelineCore",
         	"OS_RRS_Editor",
         }
);
```

Override `HandleData_Native` in the new `UOS_RRS_DataHandler` to receive the render data once a render has finished.

```cpp
/* Header File */
UCLASS()
class PROJECT_EDITOR_API UNewDataHandler : public UOS_RRS_DataHandler
{
	GENERATED_BODY()
	
protected:
	virtual void HandleData_Native(FOS_RRS_ResultData ResultData) override;
};
```

```
/* Cpp File */
#include "NewDataHandler.h"

void UNewDataHandler::HandleData_Native(FOS_RRS_ResultData ResultData)
{

}
```

In this new function, the data can then be used as required. The main classes and structs of relevance are:

* [UOS\_RRS\_DataHandler](/supported-assets/render-results-screen/how-to-use-5.2+/code-reference/classes/uos_rrs_datahandler.md)
* [FOS\_RRS\_ResultData](/supported-assets/render-results-screen/how-to-use-5.2+/code-reference/structs/fos_rrs_resultdata.md)
* [FOS\_RRS\_JobData](/supported-assets/render-results-screen/how-to-use-5.2+/code-reference/structs/fos_rrs_jobdata.md)
* [FOS\_RRS\_ShotData](/supported-assets/render-results-screen/how-to-use-5.2+/code-reference/structs/fos_rrs_shotdata.md)
* [UOS\_RRS\_RenderDataLibrary](/supported-assets/render-results-screen/how-to-use-5.2+/code-reference/classes/uos_rrs_renderdatalibrary.md)

{% hint style="success" %}
Make sure to [set the **Data Export Class** in Project Settings](#setting-a-data-handler) to the newly created Blueprint class so that it can execute when renders are finished.
{% endhint %}

## Example

There is an example Data Handler located here: **Osero Suite: Render Results Screen Content** > **Example** > **HandleData\_SaveToDataAsset**. This is a simple little Blueprint that takes the input data and saves it to a new Data Asset.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.oserosuite.com/supported-assets/render-results-screen/how-to-use-5.2+/data-handler.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
