SIGetMaterialShader

導入

v1.0

カテゴリ

shader

詳細

指定オブジェクトの指定のマテリアル ポートに接続しているシェーダを取得します。

スクリプト構文

oReturn = SIGetMaterialShader( [InputObjs], [Port] );

戻り値

マテリアル シェーダを Shader オブジェクトの XSICollection として返します。

パラメータ

パラメータ タイプ 詳細
InputObjs 文字列 オブジェクトのリスト

デフォルト値: 現在選択されている値

Port siMaterialPorts 検出するマテリアル ポート

デフォルト値: siMaterialPortSurface

VBScript の例

CreatePrim "Sphere", "NurbsSurface"
' Apply a default shader to instantiate the material
ApplyShader
' Log the name of the default shader connected to the material Surface:
set s = SIGetMaterialShader( "Sphere", siMaterialPortSurface )
if s.Count > 0 then
For i = 0 to s.Count-1
logmessage "Material Surface shader name: " & s(i).name
Next
else
logmessage "No Material Surface shader found"
end if
'Output of the above script:
'INFO : "Material Surface shader name: Phong"

関連項目

SIGetShaderOnCnxPoint