Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This callback function is called when saving a subpreset with a corresponding subpreset template. The callback will only be called if the scope of the preset template is set correctly.

  • If the MacroPage with the preset template is attached to an element other than the script module (e.g., the program), the scope of the preset template must be set to the script module.
  • If the MacroPage with the preset template is attached to the script module itself, the scope does not need to be set.

When you save a subpreset the section will be passed on from the preset template to the callback. You can manage different subsets of parameters through defining particular sectionsby using the section as condition in an if statement. The data returned by the function callback will be stored in a the subpreset. When the subpreset is restored, the onLoadSubPreset callback will receive the stored data. The data can be of any type, but it is common practice to use a table that can easily be extended with more data.

Available in: Controller.

Arguments

sectionThe name of the sectionsection as defined in the preset template.string

Return Values

The returned data will be stored in a subpreset.

...