ShaderNodeIn¶
-
class
guerilla.
ShaderNodeIn
¶ Bases:
guerilla.Node
A ShaderNode input plug, containing information about plug connection to an output, value, type, etc.
-
Desc
¶ The type descriptor of the input Value
Type: type
-
HideInput
¶ The visibility of the ShaderNodeIn
Type: bool
-
Plug
¶ The connection to the parent ShaderNodeOut.
Type: None
-
PlugName
¶ The display name of the ShaderNodeIn
Type: str
-
Value
¶ The value of the shader node Plug when not connected to a ShadeNodeOut
Type: [float or table]
-
connect
(output)¶ Connect a shader node output into this input
This method connects the given ShaderNodeOut into the ShaderNodeIn.The input is unexposed if it was exposed, and disconnected if it was connected to another output. This method throws error if the output is not a ShaderNodeOut, if the connection results in a cyclic shading network or if the connected nodes don’t belong to the same parent Shader/ShaderNode.
param output: the output to plug into this input type output: ShaderNodeOut
-
disconnect
()¶ Disconnect this input from its output
-
getconnected
()¶ get the connected shader node input or output
This method returns the connected plug into this plug. The connected plug may be eitheran output if a node output is connected into this plug, or a input if the plug is exposed. Use isexposed to check if the plug is exposed.
LUA{ – enumerate all input connections for input in children (Document, “ShaderNodeIn”, nil, true) do
local connected = input:getconnected () if connected then
- if input:isexposed () then
- print (input:getpath () .. ” exposed, connected to ” .. connected:getpath ())
- else
- print (input:getpath () .. ” connected to ” .. connected:getpath ())
end
end
end }
return: the plug connected into this input rtype: ShaderNodeOut
orShaderNodeIn
-