- NB: Document concerns OpenViBE >= 0.18.0
Original document contributed by Loic Mahe / Inria
Many OpenViBE boxes have settings that can be configured before you press play on the scenario. Since 0.18, some of these settings may be modifiable during the playback. We call these settings modifiable and describe them in this document. Note that visualization boxes may contain internal widgets allowing changing of the visualization properties. That is a different mechanism and not discussed in this document.
The modifiable settings feature allows a box to expose some of its configurable settings to the user during the playback of a scenario. These parameters are manually modifiable by the user using a widget that is similar to the one used to configure the box when the scenario is stopped.
If any box in the running scenario has modifiable settings, these will appear in the OpenViBE Window Manager. At the time of writing this, only a few boxes offer these kind of settings. You can see them in the
For example, in the
online-modifiable-temporal-filter.xml scenario, you can change the filter settings and observe directly their effects on the signal.
Box developer viewpoint
To enable this feature for some parameter, a box must declare each such setting as modifiable separately. This is done in the box descriptor with a line like :
rBoxAlgorithmPrototype.addSetting("Value to change", OV_TypeId_Integer, "1", true);
true at the end indicates that this particular setting is modifiable. The default value is
false so that previous code remains functional.
You can refer to the Modifiable Interface example box and the
box-tutorials/online-modifiable-parameters.xml scenario for further help.
When a modifiable box is dropped into the scenario, the Designer will automatically create a tab named ‘config’ in the Default Window and assign the widget to it showing the modifiable parameters. Other boxes with modifiable parameters arriving later will also be assigned to this tab.
When you press play, the modifiable settings of the box are exposed in a widget (assigned to the config tab) and can be changed by the user. The box code has to handle all the possible effects the parameter change may have on its internal function (see the modifiable temporal filter box for code example).