v4.0
このオブジェクトを所有するオーナーだけでなく、オブジェクトの影響を受けるシーンの全オブジェクトを含むProjectItemオブジェクトのProjectItemCollectionを戻します。
// get accessor Object rtn = Material.UsedBy; |
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 |