Introducing BrushCue Script: A Programming Language for Digital Art and Animation
We have been working hard on adding scripting support to BrushCue and would like to introduce our new programming language called BrushCue Script. BrushCue Script allows you to create procedural effects within BrushCue.
What it is
BrushCue Script is a programming language comprised solely of operations that exist within BrushCue. Because of this, a BrushCue Script "compiles" to the same internal representation that you would see for any of your projects. This allows for efficient execution within BrushCue and complete interoperability between what you can do in the BrushCue editor and what you can do with a script.
BrushCue Script is a purely functional programming language.
Examples
Start with a source composition and return it as the final expression:
Composition::monet_women_with_parasol()
Operations can be chained to build an effect. This applies bloom to the image, then increases its brightness:
image = Composition::monet_women_with_parasol()
image.bloom(0.6, 22.5, 0.5).brightness_adjust(1.1)
Values and intermediate graphs can also be named and reused. Here the same scale is used twice before it is applied to an image:
scale = 0.75 + 0.25
adjusted_scale = scale * scale
image = Composition::monet_women_with_parasol()
image.brightness_adjust(adjusted_scale)
Lambdas describe graphs whose inputs change at evaluation time. This sequence renders a three-second animation, brightening the image as time advances:
image = Composition::monet_women_with_parasol()
Sequence::graph(
3.0,
(time: Float) => Composition {
image.brightness_adjust(time)
}
)
Each expression describes a graph rather than immediately mutating pixels. BrushCue evaluates the final graph and keeps the intermediate values available to reuse in the editor.