v4.0
Switches the material to a default material if the assignment is
invalid. The original material that was supposed to be used is
still retained.
This method is used when there are unresolved materials, usually
because an external material library was externally modified and
some objects in the scene refer to materials which are no longer
present or were renamed. If the assignment is valid, nothing is
changed.
Material.Resolve(); |
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 Application.LogMessage oMaterial.Resolve ' This example should log something like: 'INFO : "" |