Data-Blocks

This page is based on Blender Manual Data-blocks. Please see the link for additional details.


The base unit for any Blender project is the data-block. Examples of data-blocks include mesh, object, material, texture, node tree, scene, text, brush, and even workspaces.

../../_images/dbl-outliner-blender_file_mode.png

Blender File mode in Outliner

A data-block is a generic abstraction of very different kinds of data, which features a common set of basic features, properties and behaviors.

Some common characteristics:

  • They are the primary contents of the blend-file.

  • They can reference each other, for reuse and instancing (child/parent, object/object-data, materials/images, in modifiers or constraints too …).

  • Their names are unique within a blend-file, for a given type.

  • They can be added/removed/edited/duplicated.

  • They can be linked between files (only enabled for a limited set of data-blocks).

  • They can have their own animation data.

  • They can have custom properties.

User will typically interact with the higher level data types (objects, meshes etc.). When doing more complex projects, managing data-blocks becomes more important, especially when inter-linking blend-files. The main editor for that is the Outliner Editor.

../../_images/dbl-types-icons.png

Data-block types with their icons

Not all data in Blender is a data-block; i.e. bones, sequence strips or vertex groups are not - they belong to armature, scene and mesh types respectively.

Data-Block Types

For reference, here is a table of data-block types stored in blend-files.

Link

Library Linking, supports being linked into other blend-files.

Pack

File Packing, supports file contents being packed into the blend-file (not applicable for most data-blocks which have no file reference).

A table-representation of data-blocks supported in UPBGE.

Tip

Shift-scroll over the table if text is cut/hidden.

Other Datablocks

Type

Link

Pack

Description

Action

Stores animation F-Curves; used as data-block animation data, and the Nonlinear Animation editor

Material

Set shading and texturing render properties; used by objects, meshes & curves

Scene

Primary store of all data displayed and animated; used as top-level storage for objects & animation

Texture

2D/3D textures; used by brushes and modifiers

World

Define global render environment settings

Life Time

Every data-block has its usage counted (reference count) - when there is more than one, you can see the number of current users of a data-block to the right of its name in the interface. Blender follows the general rule that unused data is eventually removed.

Since it is common to add and remove a lot of data while working, this has the advantage of not having to manually manage every single data-block. This works by skipping zero user data-blocks when writing blend-files.

../../_images/dbl-zero_fake_user.png

Protected (blue shield) data-block

Protected

Since zero user data-blocks are not saved, there are times when you want to force the data to be kept irrespective of its users.

If you are building a blend-file to serve as a library of assets that you intend to link to and from other files, you will need to make sure that they do not accidentally get deleted from the library file.

To protect a data-block, use the button with the shield icon next to its name. The data-block will then never be silently deleted by Blender, but you can still manually remove it if needed.

Sharing

Data-blocks can be shared among other data-blocks.

Examples where sharing data is common:

  • Sharing textures among materials.

  • Sharing meshes between objects (instances).

  • Sharing animated actions between objects, for example to make all the lights dim together.

You can also share data-blocks between files.

Making Single User

When a data-block is shared between several users, you can make a copy of it for a given user. To do so, click on the user count button to the right of its name (number 43 in above image). This will duplicate that data-block and assign the newly created copy to that usage only.

Note

Objects have a set of more advanced actions to become single-user.

Removing Data-Blocks

As covered in Life Time, data-blocks are typically removed when they are no longer used. They can also be manually unlinked or deleted.

Unlinking a data-block means that its user won’t use it anymore. This can be achieved by clicking on the X icon next to a data-block’s name (see above image). If you unlink a data-block from all of its users, it will eventually be deleted by Blender as described above (unless it is a protected one).

Deleting a data-block directly erases it from the blend-file, automatically unlinking it from all of its users. This can be achieved by Shift-LMB on the X icon next to its name.

Warning

Deleting some data-blocks can lead to deletion of some of its users, which would become invalid without them. The main example is that object-data deletion (like mesh, curve, camera …) will also delete all objects using it.

Those two operations are also available in the context menu when RMB-clicking on a data-block in the Outliner.