Object Hierarchy | Related C++ Class: MetaShaderRendererDef
MetaShaderRendererDef
v9.0 (2011)
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).
Application | Categories | CodePath | CodeText |
FullName | Help | Name | NestedObjects |
Origin | OriginPath | Parent | RendererOptions |
SymbolName | Type | ||
# # 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 |