C

Using Variant Tags

The variant tags feature in 3D Studio enables excluding parts of a presentation during loading. With variant tags you can avoid parsing and loading objects that are not needed in the presentation for certain variants, saving on loading time and resource usage.

This makes it possible to create multiple variations of a product UI with one single Qt 3D Studio presentation.

This page explains how to define and use variant tags in the editor. The variant tags will then be loaded from the QML application.

Create Variant Groups and Tags

Variant filtering can be applied to layers, component, groups, models, and text objects. To add a variant group and tags to that group, select the desired element in the scene graph and follow the steps below:

  1. In the inspector palette, press + Group in the Variant Tags section.
  2. Enter a group name, and press Ok.

    Note: Group names must be unique to the project.

Once you have created a variant group, you can create variant tags under it. To do so, follow the steps below:

  1. In the inspector palette, press the + Tag next to the variant group name.
  2. Enter a tag name, and press Ok.

    Note: Tag names must be unique to the variant group.

Using Variant Tags

To use a variant tag on an element, follow the steps below:

  1. In the scene graph, select desired element.
  2. In the inspector palette, under the variant tag section, click desired variant tags to use them on the element.

Once you have assigned variant tags to an element, it is indicated in the scene graph which elements are using tags from which variant groups.

It is also indicated in the slide palette, which slides are using tags from which variant groups.

Edit Variant Groups and Tags

Edit a Variant Group

You can edit name and color of a variant group. To do so, right-click the name of it in the inspector palette and select desired action from the context menu.

Edit a Variant Tag

You can edit the name of a variant tag. To do so, right-click the name of it in the inspector palette and select Rename Tag from the context menu.

Delete a Variant Tag or Group

You can delete a variant tag or group by right-clicking the name of it in the inspector palette and select Delete Tag/Group.

Importing and Exporting Variant Groups

You can import and export variant groups. Exporting will export all variant groups and tags to a .variants file, default location for the export file is the project's presentation folder.

Export Variant Groups

To export variant groups, select the Export button in the variant tags section in the inspector palette. Next, browse to the desired location, enter a file name, and press Save.

Import Variant Groups

To import variant groups, select the Import button in the variant tags section in the inspector palette. Next, browse to the desired .variants or .uia file and select Ok.

When importing variant tags, imported tags will be merged with already existing tags.

Previewing with Variant Filtering

You can filter content by variant tags when previewing your presentation in the Viewer. To do this, open the Filter Variant panel by clicking in the toolbar or by pressing the F7 key.

In this panel, you can select the variant filtering tags you wish to render when previewing in the Viewer. Only the elements satisfying the selection will be rendered.

Variant filtering works the following way:

  • With no tags selected, all elements will render.
  • With tags selected in one variant group, criteria for an element to be rendered is that it should have one of the selected tags or no tag in the selected group.
  • With tags selected in more than one variant group, the elements will need to fulfill criteria for each of the variant groups to be rendered.

If any tags are selected, it is indicated by the appearance of the play button .

Available under certain Qt licenses.
Find out more.