ShaderNodeSL

class guerilla.ShaderNodeSL

Bases: guerilla.ShaderNode

Special shader node that contains a RenderMan Shading Language script.

Script

The RenderMan SL script. This script must be written in the RenderMan Shading Languague syntax.

The script must contains at least one function. The last function declared in the script will be used as main function for this node. Once evaluated, the node will create inputs and outputs according to the main function’s prototype. The following script will create a node with two inputs and two outputs plugs :

float addAndMul (float a, b; output float mul) {

mul = a * b; return a + b;

}

Use the setSL method to change this plug.

type:str
setSL(value)

Compiles the SL node script

Parameters:value (str) – The SL script to update