SceneItem.SetMaterial.1.vbs Example

Applies To

SceneItem.SetMaterial method

Description

This example demonstrates how to use the SceneItem.SetMaterial method.

Code

set oRoot = application.activeproject.activescene.root
set oCube = oRoot.AddGeometry("Cube","MeshSurface")
set oMaterial = oCube.AddMaterial("Phong", siBranch)
set oCylinder = oRoot.AddGeometry("Cylinder","MeshSurface")
oCylinder.SetMaterial oMaterial
LogMessage "Cylinder's material name: " & oCylinder.Material.FullName
'This example should log something like:
'INFO : "Cylinder's material name: cylinder.Material"

Keywords

SceneItem SetMaterial


Autodesk Softimage 2011