v8.0 (2010)
レンダリング
マテリアルプリセットから作成したレンダツリーに、1つまたは複数の Shader を追加します。
oReturn = CreateShadersFromMaterialPreset( [PresetObj], [Container] ); |
マテリアルに接続されている最初の Shader。
| パラメータ | タイプ | 詳細 |
|---|---|---|
| PresetObj | Stringまたはマテリアル プリセット オブジェクト(「SIGetPreset」を参照) |
デフォルト値:ArgumentHandler がこの値を解決する場合があります。 |
| Container | 選択リストまたは選択 |
デフォルト値:引数が指定されていない場合は、現在の選択が使用されます。 |
/*
This example demonstrates how to use the CreateShadersFromMaterialPreset command.
A Material Preset is loaded as a shader tree and connected to the material.
*/
NewScene( null, false );
CreatePrim( "Sphere", "MeshSurface" );
CreateProjection( "sphere", siTxtSpherical, null, null, "Texture_Projection" );
IncreaseSubdivision();
IncreaseSubdivision();
SelectObj( "sphere", null, true );
SetValue( "sphere.polymsh.geom.subdivu", 15 );
SetValue( "sphere.polymsh.geom.subdivv", 15 );
strPresetPath = XSIUtils.BuildPath( Application.InstallationPath(siFactoryPath),
"Data", "DSPresets", "Materials", "Art", "im_art5.Preset" );
oShader = CreateShadersFromMaterialPreset( strPresetPath, "Sources.Materials.DefaultLib.Scene_Material" );
Application.LogMessage( oShader.FullName );
SIConnectShaderToCnxPoint( oShader, "Sources.Materials.DefaultLib.Scene_Material.surface", false );
|
CreateShaderFromPreset CreateShaderFromCLSID CreateShaderFromProgID CreateShaderCompound NestShaders UnnestShaders AddShaderCompoundPort RemoveShaderCompoundPort MoveShaderCompoundPort RenameShaderCompoundPort ExportShaderCompound ImportShaderCompound ExplodeShaderCompound SetShaderCompoundPropertiesEx GetShaderCompoundProperties EditShaderCompoundPPGLogic