Parameter Mapping
Parameters declared within the config block are visible to the configuration editor and the widget itself. External ogScript functions may access these parameters via the getConfigParams function of the widget object.
Parameters declared within the oglml block are private to the widget, and not visible to the config block.
Global parameters are visible within the widget when referenced explicitly.
Widgets also support relative parameters. When a relative parameter is referenced, its name is concatenated to the string specified in the baseOID attribute of the widget instance.
Parameters within a widget are interpreted as relative if one of the following conditions is met:
· the OID begins with a "."
· the parameter has the attribute relative set to true.
· the parameter reference explicitly specifies the baseOID by explicitly prefixing %baseoid% to the OID of the parameter.
A parameter may force reference to a local parameter by prepending %widget% to the OID of the referenced parameter.
Example
The widgetdescriptor keyer references the parameters .clip and .gain. Global parameters are created called keyer1.clip, keyer1.gain, keyer2.clip and keyer2.gain. The widgets then may be instantiated as:
<widget id="key1" widgetid="keyer" baseoid="keyer1"/>
<widget id="key2" widgetid="keyer" baseoid="keyer2"/>
The key1 widget’s parameters .clip and .gain are concatenated with the baseoid keyer1 thus mapping them to the global parameters keyer1.clip, and keyer1.gain. In a similar manner, key2 widget’s parameters map to the global parameters keyer2.clip, and keyer2.gain.
The baseoid attribute may be queried and modified dynamically through the ogScript getBaseOID and setBaseOID member functions of the widget object.