VisualShaderNodeGroupBase
Base class for a family of nodes with variable number of input and output ports within the visual shader graph.
VisualShaderNodeGroupBase.swift:11class VisualShaderNodeGroupBase
Currently, has no direct usage, use the derived classes instead.
Superclasses
class VisualShaderNodeResizableBase
Base class for resizable nodes in a visual shader graph.
Citizens in SwiftGodot
Conformances
protocol CustomStringConvertible
A type with a customized textual representation.
protocol Equatable
A type that can be compared for value equality.
protocol Hashable
A type that can be hashed into a
Hasher
to produce an integer hash value.protocol Identifiable<ID>
A class of types whose instances hold the value of an entity with stable identity.
protocol VariantRepresentable
Types that conform to VariantRepresentable can be stored directly in
Variant
with no conversion. These include all of the Variant types from Godot (for exampleGString
,Rect
,Plane
), Godot objects (those that subclass SwiftGodot.Object) as well as the built-in Swift types UInt8, Int64 and Double.protocol VariantStorable
Types that conform to VariantStorable can be stored in a Variant and can be extracted back out of a Variant.
Type members
Instance members
func addInputPort(id: Int32, type: Int32, name: String
) Adds an input port with the specified
type
(seeVisualShaderNode.PortType
) andname
.func addOutputPort(id: Int32, type: Int32, name: String
) Adds an output port with the specified
type
(seeVisualShaderNode.PortType
) andname
.func clearInputPorts(
) Removes all previously specified input ports.
func clearOutputPorts(
) Removes all previously specified output ports.
func getFreeInputPortId(
) -> Int32 Returns a free input port ID which can be used in
addInputPort(id:type:name:)
.func getFreeOutputPortId(
) -> Int32 Returns a free output port ID which can be used in
addOutputPort(id:type:name:)
.func getInputPortCount(
) -> Int32 Returns the number of input ports in use. Alternative for
getFreeInputPortId
.func getInputs(
) -> String Returns a
String
description of the input ports as a colon-separated list using the formatid,type,name;
(seeaddInputPort(id:type:name:)
).func getOutputPortCount(
) -> Int32 Returns the number of output ports in use. Alternative for
getFreeOutputPortId
.func getOutputs(
) -> String Returns a
String
description of the output ports as a colon-separated list using the formatid,type,name;
(seeaddOutputPort(id:type:name:)
).func hasInputPort(id: Int32
) -> Bool Returns
true
if the specified input port exists.func hasOutputPort(id: Int32
) -> Bool Returns
true
if the specified output port exists.func isValidPortName(String
) -> Bool Returns
true
if the specified port name does not override an existed port name and is valid within the shader.func removeInputPort(id: Int32
) Removes the specified input port.
func removeOutputPort(id: Int32
) Removes the specified output port.
func setInputPortName(id: Int32, name: String
) Renames the specified input port.
func setInputPortType(id: Int32, type: Int32
) Sets the specified input port’s type (see
VisualShaderNode.PortType
).func setInputs(String
) Defines all input ports using a
String
formatted as a colon-separated list:id,type,name;
(seeaddInputPort(id:type:name:)
).func setOutputPortName(id: Int32, name: String
) Renames the specified output port.
func setOutputPortType(id: Int32, type: Int32
) Sets the specified output port’s type (see
VisualShaderNode.PortType
).func setOutputs(String
) Defines all output ports using a
String
formatted as a colon-separated list:id,type,name;
(seeaddOutputPort(id:type:name:)
).
Subclasses
class VisualShaderNodeExpression
A custom visual shader graph expression written in Godot Shading Language.