You are here: Reference Guide > Other Nodes > BlinkScript

BlinkScript

The BlinkScript node runs the The Foundry's Blink framework enabling us to write our code once and run it on any supported device. This is achieved through code translation, in which the Blink code is turned into specific code for each target device. Code is generated and compiled on-the-fly, allowing you to switch between devices at will.

BlinkScript runs a Blink "kernel" over every pixel in the output, where a Blink kernel is similar to a C++ class, but with some special parameter types and functions. Through translation, the code in the BlinkScript node can be turned into normal C++ or SIMD code for the CPU, or OpenCL for the GPU.

The Blink framework streamlines plug-in development workflow significantly, as you no longer have to exit Nuke to compile your code.

NOTE:  GPU acceleration requires an NVIDIA GPU and drivers for CUDA 4.2 or above. To use the GPU when rendering from the command line, add --gpu to your command.

You can publish kernels in Group nodes which can then be saved as gizmos, if required. Published kernels can be encoded to protect your IP using BlinkScript's built-in kernel protection. Protected kernels are not readable when the published node is saved to a script.

WARNING:  BlinkScript is very flexible, as there are no restrictions on the code you can write within a kernel. As a result, code complied from the Kernel Source can cause Nuke to crash, so please use caution!