ShaderArrayParamDef.ItemDef2 operator

Introduced

v11.0 (2013)

Description

Returns the underlying ShaderParamDef or ShaderStructParamDef object for this array item. This method is similar to ShaderArrayParamDef.ItemDef but specific to the Python language.

C# Syntax

// get accessor
Object rtn = ShaderArrayParamDef.ItemDef2;

Examples

Python Example

#
# 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 siutils 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

See Also

ShaderArrayParameter