C

Using Data Inputs

Qt 3D Studio supports data-driven animations. This makes it possible to control timeline animations, object properties and slides with data input.

This page explains how to define and connect data inputs in the Qt 3D Studio editor. The data input value can be set using behavior scripts, DataInput QML Types, Presentation QML Types or Q3DSPresentation in the C++ API.

Data Types

Data typeDescription
BooleanBinary true/false value
FloatDecimal value
Ranged numberDecimal value with maximum and minimum values defined
StringText
VariantAny of the basic data types (boolean, float and string)
Vector22 float values
Vector33 float values

Manage Data Inputs

Add a Data Input

To add a new data input, follow the steps below.

  1. Select File > Data Inputs from the menu bar in Studio.
  2. Click the icon.
  3. Enter Name for the data input.
  4. Enter Input Type for the data input. If Ranged Number is selected, it is required to specify Minimum Range and Maximum Range.
  5. Click OK.

Edit a Data Input

To edit a data input, follow the steps below.

  1. Select File > Data Inputs from the menu bar in Studio.
  2. Select the data input you want to edit by clicking on it.

    Or

    Double-click the data input you want to edit (then skip to step 4).

  3. Click the icon.
  4. Make desired changes.
  5. Click OK.

Delete a Data Input

To delete a data input, follow the steps below.

  1. Select File > Data Inputs from the menu bar in Studio.
  2. Select the data input you want to delete by clicking on it.
  3. Click the icon.

Control the Timeline with Data Input

Note: Only data input of Ranged Number type can be used to control the timeline.

To add a data input to control the timeline animation, follow the instructions below.

  1. Add the data input according to instructions above.
  2. Click the icon located in the bottom of the scene graph.
  3. Select the desired data input from the list by clicking it.
  4. Press OK.

Once the data input has been added, it is clearly shown in the timeline palette which data input is controlling the timeline animation.

The minimum range value of the data input will correspond to the start of the timeline while the maximum range value will correspond to the end of the timeline.

To remove the data input, repeat step 2 above. Then select [No control] in step 3.

Control Slides with Data Input

Note: Only data input of String type can be used to control slides.

  1. Add the data input according to instructions above.
  2. In the slide palette, click the icon located below the slides.
  3. Select the desired data input from the list by clicking it.
  4. Press OK.

Once the data input has been added, it is clearly shown in the slide palette which data input is controlling slide transitions.

To remove the data input, repeat step 2 above. Then select [No control] in step 3.

Control an Object Property with Data Input

With data input, you can control many object properties. The properties that can be controlled is indicated with the data input icon next to the property name in the inspector palette.

The following data input types can be used to control object properties:

Data input typeUsage
BooleanTo control binary true/false properties
FloatTo control numeric properties
StringTo control text properties
VariantTo control object properties with different data types using the same data input
Vector2To control properties with two numeric values such as 2D coordinates
Vector3To control properties with three numeric values such as 3D coordinates or RGB colors
  1. Add the data input according to instructions above.
  2. Select the desired object in the scene graph.
  3. In the inspector palette, click the icon next to the object property you wish to control.
  4. Select the desired data input from the list by clicking it.
  5. Press OK.

Once the data input has been added, it is shown in the inspector palette which data input is controlling which property.

To remove the data input, repeat step 3 above. Then select [No control] in step 4.

Available under certain Qt licenses.
Find out more.