Shader.Properties

Introduced

v4.0

Description

Returns a PropertyCollection containing each Property object installed on the object. See Shader.AddProperty for a list of properties that can be installed on a Shader.

C# Syntax

// get accessor
PropertyCollection rtn = Shader.Properties;

Examples

VBScript Example

' 
'	This VBScript example demonstrates how to add CustomProperties 
'	under a Shader.
'
dim oCone, oMaterial, oPhongShader, oPhongPSet, oPhongProperties
NewScene ,false
set oCone = ActiveSceneRoot.AddGeometry( "Cone", "MeshSurface" )
set oMaterial = oCone.AddMaterial( "Phong" )
set oPhongShader = oMaterial.Shaders(0)
set oPhongPSet = oPhongShader.AddProperty( "CustomProperty", ,"ShaderNested" )
oPhongPSet.AddParameter3 "Bar", siInt4
set oPhongPSet = oPhongShader.AddProperty( "CustomProperty", ,"AnotherPSet" )
set oPhongProperties = oPhongShader.Properties
LogMessage "There are " & oPhongProperties.Count & " Properties under " & oPhongShader.FullName
for each oProperty in oPhongProperties
	LogMessage oProperty.Name
next
'INFO : "There are 2 Properties under cone.Material.Phong"
'INFO : "ShaderNested"
'INFO : "AnotherPSet"

See Also

SceneItem.Properties Shader.AddProperty