Don't get confused, stay objective

As you may have noticed the word object is used in two different (possibly confusing) ways. In Blender almost anything is referred to as an Object. A Lamp for instance is an Object, but so is a Cube or a Camera. Objects are things that can be manipulated by the user and have for example a position and a rotation.

In fact, things are a little bit more structured (or complicated, as some people say): any Blender object contains a reference to a more specific object called the data block. When you add a Cube object to an empty scene you will have a generic object at some location. That object will be called Cube and will contain a reference to another object, a Mesh. This Mesh object is called Cube by default as well but this is fine as the namespaces of different kind of objects are separate.

This separation of properties common to all objects (such as position) and properties specific to a single type of object (such as the energy of a Lamp or the vertices of a Mesh) is a logical way to order sets of properties. It also allows for the instantiation of many copies of an object without consuming a lot of memory; we can have more than one object that points to the same Mesh object for example. (The way to achieve that is to create a linked duplicate, using Alt + D.) The following diagram might help to grasp the concept:

Don't get confused, stay objective

Another way the word object is used is in the Python sense. Here we mean an instance of a class. The Blender API is object-oriented and almost every conceivable piece of structured data is represented by an object instanced from a class. Even fairly abstract concepts such as an Action or an IPO (abstract in the sense that they do not have a position somewhere in your scene) are defined as classes.

How we refer to the Blender or to the Python sense of the word object in this book will mostly be obvious from the context if you keep in mind this distinction. But if not, we tend to write the Blender sense as Object and the Python sense as object or object instance.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.136.233.153