Skip to content

scripting: Allow specifying metadata for effects that don't pass animations list

Vlad Zahorodnii requested to merge work/zzag/scripted-effect-metadata into master

The animate() function can be used in two ways:

animate({
    window: foo,
    type: Rotation,
    axis: foo
})

and

animate({
    window: foo,
    animations: [{
        type: Rotation,
        axis: foo
    }]
})

however, metadata such as "axis" will be processed as expected only in the second case.

This change makes sure that the metadata is taken into account also in the first case. Animations specified in the animations list don't inherit global metadata.

Merge request reports

Loading