シェーダまたは子シェーダに接続されている各ImageClipオブジェクトを含むImageClipCollectionを戻します。
// get accessor ImageClipCollection rtn = Shader.ImageClips; |
/* This example illustrates how to enumerate all the image clips affecting a shader, either directly or indirectly. */ NewScene( null, false ); var root = Application.ActiveProject.ActiveScene.Root; var obj = root.AddGeometry( "Cylinder", "MeshSurface" ); Selection.SetAsText( obj.Name ); ApplyShader( "Material\\Constant" ); BlendInTextureLayers( "Image" ); var mat = obj.Material; var shad = mat.Shaders(0); // Log shader parameters LogMessage( "Shader: " + shad.FullName ); // Log the image clip used var cliplist = new Enumerator( shad.ImageClips ); for ( ; !cliplist.atEnd(); cliplist.moveNext() ) { LogMessage( "Image Clip: " + cliplist.item().FullName ); } // Expected results: //INFO : Shader: cylinder.Material.Constant //INFO : Image Clip: cylinder.Material.Constant.Image_Layer.Image.noIcon_pic |