Related C++ Class: CParameterRefArray
v1.5
A collection of objects that implement the Parameter interface. In other words, each member of this collection is either of class Parameter or of any descendent class (ShaderParameter, ShaderArrayParameter, KinematicState, etc.). For a list of interfaces that implement the Parameter interface, see its object hierarchy.
/* This example demonstrates how to access a shader's parameter collection */ NewScene(null, false); // Set up a cylinder with a Color Ramp shader CreatePrim("Cylinder", "MeshSurface"); var sh = CreateShaderFromProgID("MetaSL.Generator_color_ramp.1.0", "Sources.Materials.DefaultLib.Scene_Material"); SIConnectShaderToCnxPoint("Sources.Materials.DefaultLib.Scene_Material.Color_Ramp.result", "Sources.Materials.DefaultLib.Scene_Material.Phong.ambient", false); // Check the class of each parameter in the collection for (var i=0; i<sh.Parameters.Count; i++) { var param = sh.Parameters.Item(i); Application.LogMessage( param.ScriptName + " is a(n) " + Application.ClassName(param) ); } // Expected output: // INFO : Name is a(n) Parameter // INFO : location is a(n) ShaderParameter // INFO : inputs is a(n) ShaderArrayParameter // INFO : interpolation_style is a(n) ShaderParameter // INFO : result is a(n) ShaderParameter |
set oRoot = Application.ActiveProject.ActiveScene.Root set oCube = oRoot.AddGeometry( "Cube", "MeshSurface" ) for each oParam in oCube.Parameters LogMessage oParam.Name next |