Object Hierarchy | 関連する C++クラス:MetaShaderRendererDef
MetaShaderRendererDef
v9.0 (2011)
MetaShaderRendererDef は、シェーダを使用できる各レンダラに対するシェーダの実装を識別します。ファイルの場所、ハンドラの名前、各種のレンダラオプション(バージョン番号など)があります。各ShaderDefには少なくとも1 つの MetaShaderRendererDefが定義されている必要があります(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.AddParamDef2("flurry", si.siScalarParameterType, oShaderParamDefOptions) # Add output parameter oShaderParamDefOptions = XSIFactory.CreateShaderParamDefOptions() oShaderParamDefOptions.SetTexturable(True) oOutputParams = oShaderDef.OutputParamDefs oParamDef = oOutputParams.AddParamDef2("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 |