QuickScript - Colour Cycle

This script works with the individual polygons in a vector object and will cycle through a palette of colours, applying each, in turn, to the polygon as its fill colour. The order of the polygons, as listed in the Organiser, is the order the colours will be applied. You can reverse the direction of the animation.

A set of readymade palettes are provided in the script but you can add your own by following the format in the script itself.

The script is designed for up to 24 objects. If your vector contains less than 24 separate polygons it will simply use as many colours as required.

Syntax: colourCycle(inObject, time, palette,clockwise)

inObject – is the vector object on which you want the colour cycling to take place – use the keyword this if you want the action to apply to the object triggering it. As inObject is an Opus object it does not need to be surrounded by quotation marks.

time – the approximate length of time you want the animation to take in seconds.

palette – the set of colours you want to use. The palettes provided with the script are:

rainbow – a full set of 24 colours in the order of the spectrum

rainbow quad – a repetition of 6 colours from the spectrum

rainbow fade – a set of colours from the spectrum which then fade to white

pastels – a set of retro pastel colours

greyscale – fades smoothly from black to white

red radar, blue radar, green radar – fades sharply from red/blue/green to black

red trail, blue trail, green trail – fades smoothly from red/blue/green to white

night trail – fades smoothly from black to white

day trail – fades smoothly from white to black

  mono – alternating black and white and grey.

If the script does not recognise the name of a palette it will use the default one which is rainbow quad.

 clockwise – the direction the effect will apply. The options are true or false.

 

Example:

colourCycle(dotwheel,5,"rainbow",true)

will cycle the polygons in the vector object "dotwheel" through the colours of the rainbow in a clockwise direction, in approximately 5 seconds. Note that no quotes are required around the name of the object you want to use for the effect.