MaterialX.PyMaterialXGenMsl Module

Inheritance diagram of MaterialX.PyMaterialXGenMsl

Shader generation using the Metal Shading Language.

class MaterialX.PyMaterialXGenMsl.MslResourceBindingContext(self: MaterialX.PyMaterialXGenMsl.MslResourceBindingContext, arg0: SupportsInt, arg1: SupportsInt)

Bases: HwResourceBindingContext

static create(arg0: SupportsInt, arg1: SupportsInt) MaterialX.PyMaterialXGenMsl.MslResourceBindingContext
emitDirectives(self: MaterialX.PyMaterialXGenMsl.MslResourceBindingContext, arg0: MaterialX.PyMaterialXGenShader.GenContext, arg1: MaterialX.PyMaterialXGenShader.ShaderStage) None
emitResourceBindings(self: MaterialX.PyMaterialXGenMsl.MslResourceBindingContext, arg0: MaterialX.PyMaterialXGenShader.GenContext, arg1: MaterialX.PyMaterialXGenShader.VariableBlock, arg2: MaterialX.PyMaterialXGenShader.ShaderStage) None
getSelf(self: MaterialX.PyMaterialXGenShader.GenUserData) MaterialX.PyMaterialXGenShader.GenUserData
class MaterialX.PyMaterialXGenMsl.MslShaderGenerator

Bases: HwShaderGenerator

static create() MaterialX.PyMaterialXGenShader.ShaderGenerator
bindLightShader(self: MaterialX.PyMaterialXCore.NodeDef, arg0: SupportsInt, arg1: MaterialX.PyMaterialXGenShader.GenContext) None
generate(self: MaterialX.PyMaterialXGenMsl.MslShaderGenerator, arg0: str, arg1: MaterialX.PyMaterialXCore.Element, arg2: MaterialX.PyMaterialXGenShader.GenContext) MaterialX.PyMaterialXGenShader.Shader
getColorManagementSystem(self: MaterialX.PyMaterialXGenShader.ShaderGenerator) MaterialX.PyMaterialXGenShader.ColorManagementSystem

Returns the color management system.

getTarget(self: MaterialX.PyMaterialXGenMsl.MslShaderGenerator) str
getTokenSubstitutions(self: MaterialX.PyMaterialXGenShader.ShaderGenerator) dict[str, str]

Return the map of token substitutions used by the generator.

getUnitSystem(self: MaterialX.PyMaterialXGenShader.ShaderGenerator) MaterialX_v1_39_5::UnitSystem

Returns the unit system.

getVersion(self: MaterialX.PyMaterialXGenMsl.MslShaderGenerator) str
registerShaderMetadata(self: MaterialX.PyMaterialXGenShader.ShaderGenerator, arg0: MaterialX.PyMaterialXCore.Document, arg1: MaterialX_v1_39_5::GenContext) None

Register metadata that should be exported to the generated shaders.

Supported metadata includes standard UI attributes like “uiname”, “uifolder”, “uimin”, “uimax”, etc. But it is also extendable by defining custom attributes using AttributeDefs. Any AttributeDef in the given document with exportable=”true” will be exported as shader metadata when found on nodes during shader generation. Derived shader generators may override this method to change the registration. Applications must explicitly call this method before shader generation to enable export of metadata.

registerTypeDefs(self: MaterialX.PyMaterialXGenShader.ShaderGenerator, arg0: MaterialX.PyMaterialXCore.Document) None

Register type definitions from the document.

setColorManagementSystem(self: MaterialX.PyMaterialXGenShader.ShaderGenerator, arg0: MaterialX.PyMaterialXGenShader.ColorManagementSystem) None

Sets the color management system.

setUnitSystem(self: MaterialX.PyMaterialXGenShader.ShaderGenerator, arg0: MaterialX_v1_39_5::UnitSystem) None

Sets the unit system.

unbindLightShader(self: SupportsInt, arg0: MaterialX.PyMaterialXGenShader.GenContext) None
unbindLightShaders(self: MaterialX.PyMaterialXGenShader.GenContext) None