MetaShaderRendererDef

Object Hierarchy | Related C++ Class: MetaShaderRendererDef

Inheritance

SIObject

MetaShaderRendererDef

Introduced

v9.0 (2011)

Categories

ICE Shaders

Description

The MetaShaderRendererDef identifies the implementation of the shader for each of the renderers capable of using the shader, including the file location and name of the handler, and any renderer options (for example, the version number). Every ShaderDef must have at least one MetaShaderRendererDef defined (see ShaderDef.AddRendererDef).

Methods

IsClassOf operator IsEqualTo operator    
       

Properties

Application Categories CodePath operator CodeText operator
FullName operator Help Name operator NestedObjects
Origin OriginPath Parent RendererOptions operator
SymbolName operator Type operator    
       

Examples

Python Example

# 
# This example demonstrates how to create a dynamic shader definition 
# with an input array parameter and then populate the array using the
# ValueMap object created via the ItemInitialValues property.
# 
from win32com.client import constants as si
app = Application
app.NewScene("", False)
oShaderDef = XSIFactory.CreateShaderDef("MyParser", "MyArrayDemo", 1, 0)
oShaderDef.AddShaderFamily(si.siShaderFamilyTexture)
app.LogMessage("Shader definition name: " + oShaderDef.Name)
# Add input parameter to definition
oShaderParamDefOptions = XSIFactory.CreateShaderParamDefOptions()
oShaderParamDefOptions.SetTexturable(True)
oInputParams = oShaderDef.InputParamDefs
oParamDef = oInputParams.AddParamDef("flurry", si.siScalarParameterType, oShaderParamDefOptions)
# Add output parameter
oShaderParamDefOptions = XSIFactory.CreateShaderParamDefOptions()
oShaderParamDefOptions.SetTexturable(True)
oOutputParams = oShaderDef.OutputParamDefs
oParamDef = oOutputParams.AddParamDef("blizzard", si.siScalarParameterType, oShaderParamDefOptions)
# Add renderer
oRendererDef = oShaderDef.AddRendererDef("bogus")
oRendererDef.SymbolName = "Poof"
oRendererDef.CodePath = "{LIBS}/dummy.{EXT}"
# Set the version option
oRendererOpts = oRendererDef.RendererOptions
oRendererOpts.Set("rendition", 1)
# Expected result:
# INFO : Shader definition name: MyParser.MyArrayDemo.1.0

See Also

ShaderDef.AddRendererDef ShaderDef.RemoveRendererDef ShaderDef.GetRendererDefByName Renderer Shader Definition examples installed with Softimage Shader Parser examples installed with Softimage