Timeline Integration

Adding timeline support to a 3rd party addon, be it a plugin, behavior or effect is quite easy. A little bit of extra work is needed though, here is how to do it.

Plugins

  1. Set the interpolatable plugin property option to true in all the plugin properties which should be supported by timelines.
  2. Implement the GetPropertyValueByIndex(index) method in the plugin instance class.
    index argument
    Refers to the index of each property in the plugin as they are given to the constructor of the plugin instance class.
    return value
    The current value associated with the passed in index. Depending on the current implementation this could be as easy as returning an existing variable.
  3. Implement the SetPropertyValueByIndex(index, value) method in the plugin instance class.
    index argument
    Refers to the index of each property in the plugin as they are given to the constructor of the plugin instance class.
    value argument
    The new value that needs to be applied to the specified property. The passed in value is absolute so it should be applied directly with the = operator.
    return value
    No return value is required.

Plugin that need layout view preview updates

Some plugins might need to update the layout view to give a preview of the changes they are making. In this case a few more methods needs to be implemented so the plugin can update it's internal state when a timeline starts preview and when it stops preview.

  1. Implement the OnTimelinePropertyChanged (id, value, detail) method in the plugin instance class.
    id argument
    The id of the property that is changing.
    value argument
    The value that is being applied by the timeline.
    detail argument
    An object with details about the value. It has a "resultMode" property with a value of either "absolute" or "relative".
  2. implement OnExitTimelineEditMode (). This method is called when timeline edit mode is turned off. In this method the plugin's internal state should be updated again so any timeline changes from the preview are reset. Using GetPropertyValue(id) to get values without timeline changes, applying those to the relevant internal variables of the plugin and refreshing the layout view should be enough.
  3. Behaviors

    See plugin integration above, all steps apply.

    Effects

    Edit the effect's .json file and add the interpolatable property with a value of true to each paramenter definition which should be supported by timelines. No additional modifications needed.
Addon SDK Manual 2023-11-27