Graphics Programs Reference
In-Depth Information
A Word on Datablocks
Let's take some ime to talk about datablocks; the concept can be quite diferent from what
we are normally used to from other, widely known, software packages but the good thing is
that it isn't complicated at all and mastering it is the key to using Blender more efecively.
Let's consider our starFighter object, brought from a previous project into the item1
scene. When we see the object, we think of it as a whole enity; but if we start thinking
about how it is composed, we can easily see that it has some separate and clearly disinct
components, for example, the shape is different from the material. Taking this basic idea
and pushing it further into a more technically oriented (not necessarily obvious) separaion
of components, Blender's designers decided that the way to handle and store data in
Blender would be by packing specific sets of data into datablocks and allowing datablocks to
reference other datablocks. Let's take a look at the consequences of that design decision:
F Some basic informaion of an object, such as locaion, rotaion, and scale,
along with some other data, is stored as a datablock of type Object .
F The set of data to describe a mesh (verices, edges, and faces) is stored as
a separate datablock, of type Mesh .
F The general seings of a Material (the ones editable in the Material tab of the
Properties Editor ) are stored as a Material datablock.
F The seings of a texture (available in the Texture tab of the Properties Editor )
are handled as a single datablock of type Texture .
With this method, we have the possibility to create the separate components of an object,
but how do we get the inal assembly that consitutes the full object? That is done by
allowing each type of datablock to reference some other types; for the simple object that we
are considering, the datablock of Object type can reference one datablock of Mesh type,
the Mesh datablock itself can reference multiple Material datablocks, and each Material
datablock can further reference multiple Texture datablocks. If we start drilling down from
the Object datablock into the datablocks referenced from it, we'll be able to build the enire
object.
All of that fiddling with small packets of data has a very nice advantage: A single datablock
can be referenced from as many datablocks as wanted, allowing us to reuse them easily. If
we take a look at any of the objects with the "-wire" suffix in its name and go to the Material
tab in the Properties Editor , we can see that in front of the name of the wire material there
is a number; it's the counter of how many explicit "user" datablocks are referencing the wire
material datablock. The word "explicit" is important to properly understand the mechanism,
since if there were a Texture datablock being used by the wire material, it would be
referenced explicitly only by one datablock (the wire material), thus having only one "user".
 
Search WWH ::




Custom Search