Using a Single Set of Controls To Control Parameters for Different Layers

An edit scope allows you to add a single set of controls and apply it to different objects. For example, if you have a program that contains several layers that all have the parameters Octave, Coarse, Fine, etc., you can create one set of controls for these parameters, and then switch the edit scope between the layers.

Procedure

  1. Create a program with two layers and name them LayerA and LayerB.
  2. Create a macro page for the program.
  3. In the GUI Tree, add a group to your macro page.
  4. Add a knob control to the group.
  5. To connect the engine parameter to the knob, open the Parameter List and drag the Coarse parameter for layer A onto the Value field of the knob in the Properties section.

    The field now displays LayerA.Coarse.

  6. Click the Value field of the knob.

    Now, the entire path to the engine parameter is displayed. In this example @0:LayerA/@id16.

  7. Cut the first part of the path information, that is, @0:LayerA/, and paste it to the Scope value field of the group.

    The dynamic Scope only requires the parameter ID, in this case, @id16. The first part of the path, that is, @0:LayerA/ is required as Scope information for the group.

  8. Copy the path information into the Scope value field of the group.
  9. Add a Variables folder to the macro page.
  10. Create a String List variable and name it LayerSelect.
  11. Copy the path information from the Scope value field of the group to the first entry line of the string list variable.
  12. Copy the same path information to the second entry line and change LayerA to LayerB.

    The variable switches between two path strings. Now, you need a control that switches between these two strings.

  13. Add a menu control to the macro page.

    You can also use other controls like knobs or radio switches to change the scope.

  14. In the Value field of the menu, enter @LayerSelect.
  15. In the Scope value field of the group, enter @LayerSelect as well, so that the menu and the group are both using the same variable.
  16. You can now use the menu to switch between the two scopes of the group, that is, you can select the layer that is affected.
    Note

    If you want the controls to work in a dynamic scope, first add the path information to the Scope value field of the group and then connect the engine parameters to the controls. This way, HALion automatically detects that there is an edit scope and only adds the subpath, or in the simplest case the parameter name, to the Value field when you drop the engine parameter.

    Before dragging a parameter from the Parameter List, make sure that the object from which you want to drag the parameter is selected in the Program Tree. Otherwise, HALion cannot retrieve the correct parameter name and will only show the parameter ID instead.