ShaderNode

class guerilla.ShaderNode

Bases: guerilla.SelectableNode

Base class of the shader node classes and the shader classes.

Code

The shader node default BOOTS code

Type:str
CodeRT

The shader node BOOTS code specialized for OpenGL

Type:str
Collapsed

The shader node collapse state, true for collapsed, false for expanded

Type:bool
NodePos

The shader node position in shader view

Type:{float,float}
addaov()

create a new aov

Returns:the newly create aov
Return type:ShaderNodeIn
addnode(filename)

add a node into a shader node by its filename

Parameters:filename (str) – The file name of the node to add
Returns:The created node or None if failed
Return type:ShaderNode
createinput(name, type)

Create a new input

Parameters:
  • name (str) – The input name
  • type (type) – The input type
Returns:

The created input plug

Return type:

ShaderNodeIn

createoutput(name)

Create a new output

Parameters:name (str) – The output name
Returns:The created output plug
Return type:ShaderNodeOut
fillnodefooter(template)

Fill the template footer with custom attributes

Parameters:template (table) – The template table to fill
fillnodeinputstemplate(template)

Fill the template with inputs and ouputs extended controls

Parameters:template (table) – The template table to fill
fillnodetemplate(template)

Fill the template with custom attributes

A ShaderNode template is composed by calling standard fillnodetemplateheader, then custom fillnodetemplate, then standard fillenodetemplateheader and eventually custom fillnodefooter.

Parameters:template (table) – The template table to fill
fillnodetemplatefooter(template)

Fill the template with standard node template footer, like inputs and outputs settings

Parameters:template (table) – The template table to fill
fillnodetemplateheader(template)

Fill the template with standard node template header, like inputs

Parameters:template (table) – The template table to fill
getinput(name)

Gets a child ShaderNodeIn plug by its display name

Parameters:name (str) – The input name to find
Returns:The input plug, or None if none found
Return type:ShaderNodeIn
getoutput(name)

Gets a child ShaderNodeOut plug by its display name

Parameters:name (str) – the output name to find
Returns:The output plug, or None if none found
Return type:ShaderNodeOut
removeinput(name)

Remove an input

Parameters:name (str) – The input name
removeoutput(name)

Remove an output

Parameters:name (str) – The output name