ShaderArrayParamDef.ItemDef2 operator

導入

v11.0 (2013)

説明

この配列項目の基になるShaderParamDefまたはShaderStructParamDefオブジェクトを戻します。このメソッドは ShaderArrayParamDef.ItemDef に似ていますが、Python 言語に固有のメソッドです。

C#構文

// get accessor

Object rtn = ShaderArrayParamDef.ItemDef2;

Python の例

#

# This example goes through the list of shader definitions in Softimage, 

# looks for arrays of structures and prints the parameter names as well

# as the ProgID of the owning shader definition

#

from sipyutils import *

si = si()

si.NewScene("", 0)

for shaderdef in si.ShaderDefinitions :

	for paramdef in shaderdef.InputParamDefs.Definitions :

		if paramdef.IsArray :

			underlying = paramdef.ItemDef2

			if underlying.IsStructure :

				log("Found an array of structures for %s in %s" % (paramdef.Name, shaderdef.ProgID))

# Expected results:

# INFO : Found an array of structures for lights in Softimage.material-phong.1.0

# INFO : Found an array of structures for lights in Softimage.material-lambert.1.0

関連項目

ShaderArrayParameter