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.
Variant filtering is done on layer level, to add a variant group and tags to that group, select a layer in the scene graph and follow the steps below:
- In the inspector palette, press + Group in the Variant Tags section.
- 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:
- In the inspector palette, press the + Tag next to the variant group name.
- Enter a tag name, and press Ok.
Note: Tag names must be unique to the variant group.
To use a variant tag on a layer, follow the steps below:
- In the scene graph, select desired layer
- In the inspector palette, under the variant tag section, click desired variant tags to use them on the layer.
Once you have assigned variant tags to a layer, it is indicated in the scene graph which layers are using tags from which variant groups.
It is also indicated in the slide palette, which slides are using tags from which variant groups.
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.
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.
You can delete a variant tag or group by right-clicking the name of it in the inspector palette and select Delete Tag/Group.
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.
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.
To import variant groups, select the Import button in the variant tags section in the inspector palette. Next, browse to the desired
.uia file and select Ok.
When importing variant tags, imported tags will be merged with already existing tags.
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
In this panel, you can select the variant filtering tags you wish to render when previewing in the Viewer. Only the layers satisfying the selection will be rendered.
Variant filtering works the following way:
- With no tags selected, all layers will render.
- With tags selected in one variant group, criteria for a layer to be rendered is that is should have one of the selected tags or no tag in the selected group.
- With tags selected in more than one variant group, the layers 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.