Khối dữ liệu

The base unit for any Blender project is the data-block. Examples of data-blocks include: meshes, objects, materials, textures, node trees, scenes, texts, brushes, and even Workspaces.

../_images/files_data-blocks_outliner-blender-file-view.png

Blender File view of the 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.

  • Tính Chất Tùy Chỉnh -- 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.

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

Thể Loại của khối dữ liệu

../_images/files_data-blocks_id-types.png

Data-blocks types with their icon.

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

Kết Nối

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

Đóng Gói

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

Thể Loại

Kết Nối

Đóng Gói

Miêu Tả

Action

|Không|

Điều Vận Hoạt Họa -- Animation Drivers.
Used as data-block animation data,
and the Nonlinear Animation editor.

Cốt (Armatures)

|Không|

Skeleton used to deform meshes.
Used as data of armature objects, and by the Armature Modifier.

Brush

|Không|

Used by paint tools.

máy quay phim -- Camera

|Không|

Used as data by camera objects.

Cache File

|Không|

Used by Mesh Cache modifiers.

Đường Cong (Curve)

|Không|

Được sử dụng bởi các vật thể đường cong, phông chữ và bề mặt như dữ liệu vậy.

Font

Đối Chiếu và Liên Kết -- Cross References and Linkage.
Used by curve object-data of text objects.

Grease Pencil

|Không|

Dữ liệu phác thảo 2D/3D mà các vật thể Bút Chì Dầu sử dụng.
Sử dụng như thông tin của helper vẽ lồng, bởi
3D Viewport, Image, Sequencer & Movie Clip editors.

Collection

|Không|

Group and organize objects in scenes.
Used to instance objects, and in library linking.

Image

Tập Tin Hình Ảnh.
Used by shader nodes and textures.

Hình Mẫu (Shape Keys)

|Giao Hòa/Hình Thập Tự|

|Không|

Geometry shape storage, which can be animated.
Used by mesh, curve, and lattice objects.

Nguồn Ánh Sáng (Light)

|Không|

Used as object data by light objects.

Library

|Giao Hòa/Hình Thập Tự|

References to an external blend-file.
Access from the Outliner's Blender File view.

Line Style

|Không|

Used by the Freestyle renderer.

Lưới Rào -- Lattice

|Không|

Grid based lattice deformation.
Used as data of lattice objects, and by the Lattice Modifier.

Mask

|Không|

2D animated mask curves.
Used by compositing nodes & sequencer strip.

Material

|Không|

Set shading and texturing render properties.
Used by objects, meshes & curves.

Siêu Cầu (Metaball)

|Không|

An isosurface in 3D space.
Used as data of metaball objects.

Khung Lưới (Mesh)

|Không|

Geometry made of vertices/edges/faces.
Used as data of mesh objects.

Movie Clip

|Giao Hòa/Hình Thập Tự|

Reference to an image sequence or video file.
Used in the Movie Clip editor.

Node Tree

|Không|

Groups of re-usable nodes.
Used in the node editors.

Object

|Không|

An entity in the scene with location,
scale, rotation.
Tập Hợp Cảnh.

Paint Curve

|Không|

Stores a paint or sculpt stroke.
Access from the paint tools.

Palette

|Không|

Store color presets.
Access from the paint tools.

Particle

|Không|

Sắp Đặt Hạt.
Used by particle systems.

Dò Tia Sáng (Light Probe)

|Không|

Help achieve complex real-time lighting in Eevee.

Scene

|Không|

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

Sounds

Reference to sound files.
Used as data of speaker objects.

Loa (Speaker)

|Không|

Sound sources for a 3D scene.
Used as data of speaker object.

Text

|Giao Hòa/Hình Thập Tự|

Text data.
Used by Python scripts and OSL shaders.

Texture

|Không|

Chất liệu hình ảnh.
Used by brushes and modifiers.

Window Manager

|Giao Hòa/Hình Thập Tự|

|Không|

The overarching manager for all of Blender's user interface.
Includes Workspaces, notification system, operators, and keymaps.

World

|Không|

Define global render environment settings.

Workspace

|Giao Hòa/Hình Thập Tự|

|Không|

Bố Trí UV.
Used by each window, which has its own workspace.

Tuổi Thọ

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.

Được Bảo Vệ

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.

Dùng chung/phân hưởng/có cùng một

Nhiều khối dữ liệu có thể được dùng chung trong các khối dữ liệu khác.

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, see linked libraries.

Tạo Đơn Người Dùng

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. This will duplicate that data-block and assign the newly created copy to that usage only.

Ghi chú

Objects have a set of more advanced actions to become single-user, see their documentation.

Xóa Bỏ khối dữ liệu

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. 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.

Cảnh báo

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.

Tính chất tự tạo

../_images/files_data-blocks_add.png

Tính Chất Tùy Chỉnh -- Custom Properties.

Custom properties are a way to store your own data in Blender's data-blocks. It can be used for rigging (where bones and objects can have custom properties driving other properties), and Python scripts, where it's common to define new settings not available in Blender. It is also possible to access custom properties from materials via the Attribute Node.

Only certain data supports custom properties:

To add a custom property, search for the Custom Properties panel, found at the bottom of most Properties or Sidebar region, and click New. Properties can be removed from the same location with the delete icon. Once properties are added they can be configured via the edit icon to work for a particular use case; see Editing Properties for more information.

Biên soạn các Tính Chất

Giao Diện Người Dùng

../_images/files_data-blocks_edit.png

Tính Chất Tùy Chỉnh -- Custom Properties.

Custom properties can be edited using the panel available for data types that support it. Editing the properties allows you to configure things such as default values, ranges, and even add a custom tooltip.

Thể Loại

The data type of the property; different data types have can only have specific data properties.

Float

A numeric value with decimals e.g. 3.141, 5.0, or 6.125.

Mảng Số Thực Dấu Phẩy Động

A collection of multiple float data types e.g. [3.141, 5.0, 6.125] . This data type can also be used for data that can be represented as a float array such as colors. These special float arrays can be set in the Subtype selector.

Số Nguyên

A numeric value without any decimals e.g. 1, 2, 3, or 4.

Mảng Số Nguyên

A collection of multiple integer data types e.g. [1, 2, 3, 4] .

Chuỗi Ký Tự (String)

A sequence of characters such as "Some Text".

Tập Lệnh Python -- Python Scripts

Edit a Python data type directly, used for unsupported data types.

Ghi chú

Boolean values must be handled as integers and only work when using Min/Max values that are integers and that are no more than 1 apart.

At this point, the Boolean values will still look like integers but behave like a Boolean having one lower, off, value and a higher, on, value.

Chiều Dài Mảng

The number of elements in the array. Note that if the array length is greater than 7 you cannot directly edit its elements, you must press Edit Value to edit the elements of the array.

Tên Tính Chất

The text that is displayed to the left of the value. This name is also used to access the property via Python.

Giá Trị Mặc Định

This sets the default value of the property used by the Reset to Default Value operator.

Cảnh báo

Default values are used as the basis of NLA blending, and a nonsensical default (e.g. 0 for a property used for scaling) on a property intended for being keyframed is likely to cause issues.

Mức/Độ Tối Thiểu, tối đa

The minimum/maximum value the custom property can take.

Thư Viện có Vượt Quyền Được Không

Allow the property to be overridden when the data-block is linked.

Dùng Giới Hạn Mềm

Enables limits that the Property Value slider can be adjusted to without having to input the value numerically.

Độ Mềm Mại Tối Thiểu, Tối Đa

The minimum/maximum value for the soft limit.

Bước

A multiplier to control how much the data type is incremented at a time. The internal step size for floats is 0.01, so a Step value of 5 will increment at a rate of 0.05 and a Step value of 100 will increment by 1.0. For integers the internal step size is 1.

Độ Chuẩn Xác

The number of digits after the decimal to display in the user interface for float data types.

Kiểu Thứ

Specifies the type of data the property contains, which affects how it appears in the user interface. In order for this property to appear the Property Value must be a vector of floats. For either of the color subtypes to work the Property Value must be a vector with three or four values depending on the availability of an Alpha Channel.

Dữ Liệu Mặt Phẳng

Data values do not have any special behavior.

Màu Của Đường Nét

Color in linear color space.

Màu Đã Sửa Gamma

Color in gamma corrected color space.

Góc Độ Euler

Euler Rotation angles.

Góc Quaternion

Vị Trí, Xoay Chiều, Tỷ Lệ.

Miêu Tả

Allows you to write a custom Tooltip for your property.

Truy Cập Python

Custom properties can be accessed in a similar way to dictionaries, with the constraints that keys can only be strings, and values can only be strings, numbers, arrays of such, or nested properties.

Xin xem thêm bài bpy.context để biết về những thuộc tính ngữ cảnh khác.