Material.Properties

導入

v4.0

詳細

オブジェクトに実装されているすべてのプロパティに対応するPropertyオブジェクトを含むPropertyCollectionを戻します。現時点では、Material の下にネストできるのは、UserDataBlobおよびCustomPropertyだけです。

C#構文

// get accessor

PropertyCollection rtn = Material.Properties;

VBScript の例

'

' This example shows how to add a CustomProperty

' to a Material with Material.AddProperty

'

dim oCone, oMaterial, oMaterialPSet

NewScene ,false

set oCone = ActiveSceneRoot.AddGeometry( "Cone", "MeshSurface" )

set oMaterial = oCone.AddMaterial( "Phong")

' Annotation is a specific CustomProperty that is shipped with Softimage

set oMaterialPSet = oMaterial.AddProperty( "Annotation",,"MaterialAnnotation" )

oMaterialPSet.Parameters("text").Value = "Annotation under a Material"

' You can access any CustomProperty under the Material using Material.Properties

Application.LogMessage "Contents of annotation: " & oCone.Material.Properties("MaterialAnnotation").Text.Value

'Expected Results:

'INFO : "Contents of annotation: Annotation under a Material"

関連項目

SceneItem.Properties Material.AddProperty