Material.UsedBy

導入

v4.0

詳細

このオブジェクトを所有するオーナーだけでなく、オブジェクトの影響を受けるシーンの全オブジェクトを含むProjectItemオブジェクトのProjectItemCollectionを戻します。

C#構文

// get accessor

Object rtn = Material.UsedBy;

VBScript の例

NewScene , false

set Scene = Application.ActiveProject.ActiveScene

set MatLib = Scene.ActiveMaterialLibrary

set MyMaterial = MatLib.CreateMaterial( "Phong", "MyPhong" )

set SceneRoot = Scene.Root

set MyGrid = SceneRoot.AddGeometry("Grid","MeshSurface")

set MySphere = SceneRoot.AddGeometry("Sphere","MeshSurface")

SIAssignMaterial MyGrid, MyMaterial 

SIAssignMaterial MySphere, MyMaterial 

Application.LogMessage "Object is Used by : "

for each oOwner in MyMaterial.UsedBy

Application.LogMessage oOwner.Name

next

' This example should log something like:

' INFO : Object is Used by : 

' INFO : grid

' INFO : sphere