SwiftclassShaderGraph

class ShaderGraph.ShaderGraph

Structure

What a query’s scopes step through. Every node here can be matched — see the syntax.

inherits{}

Members 35

  1. deinitdeinit
  2. fieldvar functionConstantInputs: [String]+0x30
  3. fieldvar inputDefaultValues: [String : ShaderGraph.ShaderGraph.Value?]+0x20
  4. fieldvar materialXVersion: ShaderGraph.ShaderGraph.NodeLibrary.Version?+0x10
  5. fieldvar primvarMappings: [String : ShaderGraph.ShaderGraph.TextureCoordinate]+0x28
  6. fieldvar sgGraph: ShaderGraph.SGGraph+0x18
  7. funcaddConstant(_: ShaderGraph.ShaderGraph.Value, named: String) throws -> String
  8. funcaddConstant(ShaderGraph.ShaderGraph.Value) throws -> String
  9. funcaddEdge(ShaderGraph.ShaderGraph.Edge) throws -> ()
  10. funcaddNode(ShaderGraph.ShaderGraph.Node) throws -> String
  11. funccanAddEdge(ShaderGraph.ShaderGraph.Edge) -> Bool
  12. funccanAddNode(ShaderGraph.ShaderGraph.Node) -> Bool
  13. funcconnect(_: ShaderGraph.ShaderGraph.Node, outputPort: String?, to: ShaderGraph.ShaderGraph.Node, inputPort: String) throws -> ()
  14. funcconnect(_: String, outputPort: String?, to: String, inputPort: String) throws -> ()
  15. funccontainsEdge(ShaderGraph.ShaderGraph.Edge) -> Bool
  16. funcencode() throws -> Foundation.Data
  17. funcremoveEdge(ShaderGraph.ShaderGraph.Edge) throws -> ()
  18. funcremoveNode(String) throws -> ()
  19. funcreplace(nodes: [String : ShaderGraph.ShaderGraph.Node], edges: [ShaderGraph.ShaderGraph.Edge]) throws -> ()
  20. funcuniqueName(String) -> String
  21. funcupdateNode(_: ShaderGraph.ShaderGraph.Node, forKey: String) throws -> ()
  22. funcvalidate() -> Bool
  23. funcvalidateAddingEdge(ShaderGraph.ShaderGraph.Edge) throws -> ()
  24. funcvalidateAddingNode(ShaderGraph.ShaderGraph.Node) throws -> ()
  25. initShaderGraph.ShaderGraph.__allocating_init(sgGraph: ShaderGraph.SGGraph) -> ShaderGraph.ShaderGraph
  26. initShaderGraph.ShaderGraph.__allocating_init(from: Foundation.Data) throws -> ShaderGraph.ShaderGraph
  27. initShaderGraph.ShaderGraph.__allocating_init(named: String, inputs: [ShaderGraph.ShaderGraph.NodeDefinition.Input], outputs: [ShaderGraph.ShaderGraph.NodeDefinition.Output], nodeLibrary: ShaderGraph.ShaderGraph.NodeLibrary) throws -> ShaderGraph.ShaderGraph
  28. initShaderGraph.ShaderGraph.__allocating_init(named: String, inputs: [ShaderGraph.ShaderGraph.NodeDefinition.Input], outputs: [ShaderGraph.ShaderGraph.NodeDefinition.Output]) throws -> ShaderGraph.ShaderGraph
  29. subscriptsubscript.getter : (String) -> ShaderGraph.ShaderGraph.Node?
  30. varfinal var arguments: ShaderGraph.ShaderGraph.Node { get }
  31. varfinal var edges: [ShaderGraph.ShaderGraph.Edge] { get }
  32. varfinal var inputs: [ShaderGraph.ShaderGraph.NodeDefinition.Input] { get }
  33. varfinal var nodes: [String : ShaderGraph.ShaderGraph.Node] { get }
  34. varfinal var outputs: [ShaderGraph.ShaderGraph.NodeDefinition.Output] { get }
  35. varfinal var results: ShaderGraph.ShaderGraph.Node { get }
class ShaderGraph {
    enum Value {
        case bool(Swift.Bool)
        case uchar(Swift.UInt8)
        case int(Swift.Int32)
        case uint(Swift.UInt32)
        case half(Swift.Float16)
        case float(Swift.Float)
        case string(Swift.String)
        case float2(Swift.SIMD2<Swift.Float>)
        case float3(Swift.SIMD3<Swift.Float>)
        case float4(Swift.SIMD4<Swift.Float>)
        case half2(Swift.SIMD2<Swift.Float16>)
        case half3(Swift.SIMD3<Swift.Float16>)
        case half4(Swift.SIMD4<Swift.Float16>)
        case int2(Swift.SIMD2<Swift.Int32>)
        case int3(Swift.SIMD3<Swift.Int32>)
        case int4(Swift.SIMD4<Swift.Int32>)
        case float2x2(__C.simd_float2x2)
        case float3x3(__C.simd_float3x3)
        case float4x4(__C.simd_float4x4)
        case half2x2(__C.simd_half2x2)
        case half3x3(__C.simd_half3x3)
        case half4x4(__C.simd_half4x4)
        case cgColor3(__C.CGColorRef)
        case cgColor4(__C.CGColorRef)

        init(value: Swift.String, type: ShaderGraph.ShaderGraph.DataType) throws
        init(sgType: __C.SGDataType, sgStorage: ShaderGraph.SGDataTypeStorage)

        var dataType: ShaderGraph.ShaderGraph.DataType {
            get
        }
        var sgDataType: __C.SGDataType {
            get
        }
        var sgDataTypeStorage: ShaderGraph.SGDataTypeStorage {
            get
        }
        var type: ShaderGraph.ShaderGraph.DataType {
            get
        }
    }
    enum DataType {
        case bool
        case uchar
        case int
        case uint
        case half
        case float
        case string
        case float2
        case float3
        case float4
        case half2
        case half3
        case half4
        case int2
        case int3
        case int4
        case float2x2
        case float3x3
        case float4x4
        case half2x2
        case half3x3
        case half4x4
        case surfaceShader
        case geometryModifier
        case postLightingShader
        case cgColor3
        case cgColor4
        case texture

        init(sgDataType: __C.SGDataType)
        init(name: Swift.String, kind: ShaderGraph.MaterialXDataType.Kind)

        var sgDataType: __C.SGDataType {
            get
        }
    }
    enum TextureCoordinate {
        case uv0
        case uv1
        case uv2
        case uv3
        case uv4
        case uv5
        case uv6
        case uv7

        init(name: Swift.String) throws

        var name: Swift.String {
            get
        }
    }
    struct NodeDefinition {
        enum Platform {
            case iOS
            case macOS
            case watchOS
            case tvOS
            case visionOS
        }
        enum Availability {
            case available(introduced: __C.NSOperatingSystemVersion?, deprecated: __C.NSOperatingSystemVersion?, obsoleted: __C.NSOperatingSystemVersion?)
            case unavailable

            init(coreAvailabilityKind: ShaderGraph.NodeDef.Availability.AvailabilityKind)
        }
        struct SemanticType {
            let name: Swift.String
            let values: [Swift.String]?

            init(name: Swift.String, values: [Swift.String]?)
        }
        struct Output {
            let name: Swift.String
            let type: ShaderGraph.ShaderGraph.DataType
            let semanticType: ShaderGraph.ShaderGraph.NodeDefinition.SemanticType?
            let defaultValue: ShaderGraph.ShaderGraph.Value?

            init(name: Swift.String, type: ShaderGraph.ShaderGraph.DataType, semanticType: ShaderGraph.ShaderGraph.NodeDefinition.SemanticType?, defaultValue: ShaderGraph.ShaderGraph.Value?)
            init(_: ShaderGraph.BuiltInDefinition.OutputSpec)
            init(_: ShaderGraph.NodeDef.IOSpec) throws
        }
        struct Input {
            let name: Swift.String
            let type: ShaderGraph.ShaderGraph.DataType
            let isUniform: Swift.Bool
            let semanticType: ShaderGraph.ShaderGraph.NodeDefinition.SemanticType?
            let defaultValue: ShaderGraph.ShaderGraph.Value?

            init(name: Swift.String, type: ShaderGraph.ShaderGraph.DataType, isUniform: Swift.Bool, semanticType: ShaderGraph.ShaderGraph.NodeDefinition.SemanticType?, defaultValue: ShaderGraph.ShaderGraph.Value?)
            init(_: ShaderGraph.BuiltInDefinition.InputSpec)
            init(_: ShaderGraph.NodeDef.IOSpec) throws
        }
        var name: Swift.String
        var functionalName: Swift.String
        var group: Swift.String?
        var availability: [ShaderGraph.ShaderGraph.NodeDefinition.Platform : ShaderGraph.ShaderGraph.NodeDefinition.Availability]
        var inputs: [ShaderGraph.ShaderGraph.NodeDefinition.Input]
        var outputs: [ShaderGraph.ShaderGraph.NodeDefinition.Output]

        init(name: Swift.String, inputs: [ShaderGraph.BuiltInDefinition.InputSpec], outputs: [ShaderGraph.BuiltInDefinition.OutputSpec])
        init(builtIn: ShaderGraph.BuiltInDefinition) throws
        init(nodeDef: ShaderGraph.NodeDef) throws

        func asBuiltInDefinition() -> ShaderGraph.BuiltInDefinition
        func isAvailable(on: ShaderGraph.ShaderGraph.NodeDefinition.Platform, version: __C.NSOperatingSystemVersion?) -> Swift.Bool
    }
    struct Node {
        enum NodeData {
            case definition(ShaderGraph.ShaderGraph.NodeDefinition)
            case graph(ShaderGraph.ShaderGraph)
            case constant(ShaderGraph.ShaderGraph.Value)

            init(nodeData: ShaderGraph.NodeData)

            func asSGNodeData() throws -> ShaderGraph.NodeData
        }
        var name: Swift.String
        var data: ShaderGraph.ShaderGraph.Node.NodeData

        init(from: ShaderGraph.SGNode)
        init(name: Swift.String, data: ShaderGraph.ShaderGraph.Node.NodeData)

        func asSGNode() throws -> ShaderGraph.SGNode
    }
    struct Edge {
        var outputNode: Swift.String
        var outputPort: Swift.String?
        var inputNode: Swift.String
        var inputPort: Swift.String

        init(outputNode: Swift.String, outputPort: Swift.String?, inputNode: Swift.String, inputPort: Swift.String)

        var from: Swift.String {
            get
        }
        var to: Swift.String {
            get
        }
    }
    class NodeLibrary {
        struct Version {
            enum Kind {
                case materialX138
                case materialX139
            }
            let kind: ShaderGraph.ShaderGraph.NodeLibrary.Version.Kind

            var materialXVersion: ShaderGraph.MaterialXVersion {
                get
            }

            static var default: ShaderGraph.ShaderGraph.NodeLibrary.Version {
                get
            }
            static var materialX138: ShaderGraph.ShaderGraph.NodeLibrary.Version {
                get
            }
            static var materialX139: ShaderGraph.ShaderGraph.NodeLibrary.Version {
                get
            }
        }
        let nodeDefStore: ShaderGraph.NodeDefStore
        let version: ShaderGraph.ShaderGraph.NodeLibrary.Version

        init(version: ShaderGraph.ShaderGraph.NodeLibrary.Version)
        init(nodeDefStore: ShaderGraph.NodeDefStore, version: ShaderGraph.ShaderGraph.NodeLibrary.Version)

        final var definitions: some Swift.Collection<ShaderGraph.ShaderGraph.NodeDefinition> {
            get
        }

        final func makeNode(from: ShaderGraph.ShaderGraph.NodeDefinition) throws -> ShaderGraph.ShaderGraph.Node
        final func definition(named: Swift.String) -> ShaderGraph.ShaderGraph.NodeDefinition?
        final func definitions(function: Swift.String, input: ShaderGraph.ShaderGraph.DataType) -> [ShaderGraph.ShaderGraph.NodeDefinition]
        final func definitions(function: Swift.String, inputs: ShaderGraph.ShaderGraph.DataType...) -> [ShaderGraph.ShaderGraph.NodeDefinition]
        final func definitions(function: Swift.String, inputs: [ShaderGraph.ShaderGraph.DataType]) -> [ShaderGraph.ShaderGraph.NodeDefinition]
        final func definitions(function: Swift.String, output: ShaderGraph.ShaderGraph.DataType) -> [ShaderGraph.ShaderGraph.NodeDefinition]

        deinit
    }
    final var materialXVersion: ShaderGraph.ShaderGraph.NodeLibrary.Version?
    final var sgGraph: ShaderGraph.SGGraph
    var inputDefaultValues: [Swift.String : ShaderGraph.ShaderGraph.Value?]
    final var primvarMappings: [Swift.String : ShaderGraph.ShaderGraph.TextureCoordinate]
    final var functionConstantInputs: [Swift.String]

    init(named: Swift.String, inputs: [ShaderGraph.ShaderGraph.NodeDefinition.Input], outputs: [ShaderGraph.ShaderGraph.NodeDefinition.Output]) throws
    init(named: Swift.String, inputs: [ShaderGraph.ShaderGraph.NodeDefinition.Input], outputs: [ShaderGraph.ShaderGraph.NodeDefinition.Output], nodeLibrary: ShaderGraph.ShaderGraph.NodeLibrary) throws
    init(sgGraph: ShaderGraph.SGGraph)

    init(from: Foundation.Data) throws

    final var arguments: ShaderGraph.ShaderGraph.Node {
        get
    }
    final var edges: [ShaderGraph.ShaderGraph.Edge] {
        get
    }
    final var inputs: [ShaderGraph.ShaderGraph.NodeDefinition.Input] {
        get
    }
    final var nodes: [Swift.String : ShaderGraph.ShaderGraph.Node] {
        get
    }
    final var outputs: [ShaderGraph.ShaderGraph.NodeDefinition.Output] {
        get
    }
    final var results: ShaderGraph.ShaderGraph.Node {
        get
    }

    final func canAddEdge(_: ShaderGraph.ShaderGraph.Edge) -> Swift.Bool
    final func canAddNode(_: ShaderGraph.ShaderGraph.Node) -> Swift.Bool
    final func removeEdge(_: ShaderGraph.ShaderGraph.Edge) throws
    final func removeNode(_: Swift.String) throws
    final func uniqueName(_: Swift.String) -> Swift.String
    final func updateNode(_: ShaderGraph.ShaderGraph.Node, forKey: Swift.String) throws
    final func addConstant(_: ShaderGraph.ShaderGraph.Value, named: Swift.String) throws -> Swift.String
    final func addConstant(_: ShaderGraph.ShaderGraph.Value) throws -> Swift.String
    final func containsEdge(_: ShaderGraph.ShaderGraph.Edge) -> Swift.Bool
    final func validateAddingEdge(_: ShaderGraph.ShaderGraph.Edge) throws
    final func validateAddingNode(_: ShaderGraph.ShaderGraph.Node) throws
    final func encode() throws -> Foundation.Data
    final func addEdge(_: ShaderGraph.ShaderGraph.Edge) throws
    final func addNode(_: ShaderGraph.ShaderGraph.Node) throws -> Swift.String
    final func connect(_: ShaderGraph.ShaderGraph.Node, outputPort: Swift.String?, to: ShaderGraph.ShaderGraph.Node, inputPort: Swift.String) throws
    final func connect(_: Swift.String, outputPort: Swift.String?, to: Swift.String, inputPort: Swift.String) throws
    final func replace(nodes: [Swift.String : ShaderGraph.ShaderGraph.Node], edges: [ShaderGraph.ShaderGraph.Edge]) throws
    final func validate() -> Swift.Bool

    final subscript(_: Swift.String) -> ShaderGraph.ShaderGraph.Node? {
        get
    }

    deinit
}