Prev: An Advanced Scripted Object Next: Tool Scripts

6. Object3D and ObjectInfo

Let's take a break from writing scripts, and learn a bit more about how Art of Illusion represents the objects in a scene. You have already encountered two object classes: Sphere and Tube. There are many others: Cube, TriangleMesh, SplineMesh, PointLight, SpotLight, and so on.

All of these classes are subclasses of artofillusion.object.Object3D. An Object3D defines the geometry or other internal properties of an object. The Object3D class defines properties which are common to many types of objects:

It also includes abstract methods for many operations that can be performed on objects. Some of the most commonly used include:

Another important class to know about is artofillusion.object.ObjectInfo. An ObjectInfo is a "wrapper" around an Object3D, and describes the role of that object within the scene:

It is possible for several different ObjectInfos to all reference the same Object3D. In that case, they are "live duplicates" of each other: any change to one object will automatically affect all of them.

Prev: An Advanced Scripted Object Next: Tool Scripts