数据块
任何 Blender 项目的基本单元都是数据块。例如:网格(meshes)、物体(objects)、材质(materials)、纹理(textures)、节点树(node-trees)、场景(scenes)、文本(texts)、笔刷(brushes) ,甚至是屏幕(screens)。
一个数据块是不同类型数据的一种通用抽象,具有一组共同的基本特征,属性和行为。
通用特性:
各种数据块是组成
.blend
文件的主要内容。可以互相关联,以便于重复利用和实例化(父/子、物体/物体数据,材质/图像,以及修改器和约束等方式)。
对于同一个
.blend
文件中的给定的数据块类型,其名字是唯一的。允许添加、删除、修改和复制。
数据块能在文件之间相互关联(仅限部分数据块)。
可以有自己的动画数据。
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.
并非 Blender 中的每个数据都是数据块,例如骨骼、序列条带或顶点组就不是数据块,它们分别属于骨架,场景和网格类型。
数据块类型
这里有一张表格,列出了 .blend
文件中存储的数据类型,仅供参考。
- 关联
库关联,支持关联到其他
.blend
文件中。- 打包(Pack)
File Packing, supports file contents being packed into the blend-file (not applicable for most data-blocks which have no file reference).
类型 |
关联 |
打包(Pack) |
描述 |
---|---|---|---|
✓ |
— |
Stores animation F-curves.
用作动画数据,
以及非线性动画编辑器。
|
|
✓ |
— |
带动网格形变的骨架。
用作骨架物体的数据,以及骨架修改器(Armature Modifier)。
|
|
✓ |
— |
用于绘制工具。
|
|
✓ |
— |
用于相机物体的数据。
|
|
✓ |
— |
用于网格缓存修改器。
|
|
✓ |
— |
用作曲线,字体和曲面物体的数据。
|
|
✓ |
✓ |
字体文件引用。
文本物体的曲线数据。
|
|
✓ |
— |
Grease Pencil 物体使用的2D / 3D草图数据。
在3D视窗,图像、序列&影片剪辑编辑器中
3D Viewport, Image, Sequencer & Movie Clip editors.
|
|
✓ |
— |
把场景中的物体分组整理。
用于实例物体和库链接。
|
|
✓ |
✓ |
图像文件。
用于着色节点和贴图。
|
|
✗ |
— |
存储几何形状的形变信息,用于动画。
用于网格,曲线和晶格物体。
|
|
✓ |
— |
用作灯光物体的数据。
|
|
✗ |
✓ |
对外部
.blend 文件的引用。从大纲视图的 Blender文件 视图访问。
|
|
✓ |
— |
用于 FreeStyle 渲染引擎。
|
|
✓ |
— |
基于网格的晶格变形。
用作晶格物体的数据,用于晶格修改器。
|
|
✓ |
— |
平面动画遮罩曲线。
用于合成节点与序列编辑器。
|
|
✓ |
— |
设置阴影和纹理的渲染属性。
用于物体,网格与曲线。
|
|
✓ |
— |
三维的等值曲面。
用于融球物体的数据。
|
|
✓ |
— |
由顶点/边/面生成的几何体。
用于网格物体的数据。
|
|
✓ |
✗ |
引用图片序列或视频文件。
用于 影片剪辑编辑器。
|
|
✓ |
— |
可复用的节点组。
用于节点编辑器。
|
|
✓ |
— |
包含场景中位置,
缩放和旋转的实体。
被用于场景和集合。
|
|
✓ |
— |
保存一个绘制或雕刻的笔划数据。
从绘图工具中访问。
|
|
✓ |
— |
存储预设的颜色。
从绘图工具中访问。
|
|
✓ |
— |
粒子设置。
用于粒子系统。
|
|
✓ |
— |
帮助在Eevee中实现复杂的实时照明。
|
|
✓ |
— |
主要存储所有的显示和动画数据。
是物体和动画的最高存储单位。
|
|
✓ |
✓ |
参考的声音文件。
用于扬声器物体数据。
|
|
✓ |
— |
三维场景的发声源。
用于扬声器物体数据。
|
|
✓ |
✗ |
文本数据.
用于 Python 脚本和 OSL shader。
|
|
✓ |
— |
2D/3D 纹理。
用于笔刷和修改器。
|
|
✗ |
— |
The overarching manager for all of Blender's user interface.
包含工作区、通知系统、操作和键位映射。
|
|
✓ |
— |
定义全局渲染环境的设置项。
|
|
✗ |
— |
界面布局。
用于每个有自己的工作区的窗口。
|
生存期
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.
保护
由于零用户的数据块不会被保存,但有时你可能想要强制保留这些数据,而无需关心其使用者。
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.
生成单用户
在多个用户之间共享数据块时,可以通过单击其名称右侧的用户计数按钮为指定的用户生成数据块的副本。这会复制该数据块并将新创建的副本分配给这个用法。
Note
Objects have a set of more advanced actions to become single-user, see their documentation.
删除数据块
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).
删除数据块将直接从 .blend
文件中删除它,自动将其与所有用户断开连接。 这可以通过在其名称旁边的“X”图标上点击 Shift-LMB 来实现。
Warning
删除某些数据块可能会导致某些用户被删除,如果没有这些数据块这些用户将无效。 常见的例子比如删除物体数据(如网格,曲线,相机……)也将删除使用它的所有物体。
这两种操作也可以在上下文菜单中使用 RMB - 单击 大纲视图 中的数据块。
自定义属性
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.
只有这些数据支持自定义属性:
所有 数据块类型。
骨骼和姿态骨骼。
序列片段。
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.
编辑属性
用户界面
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.
- 类型
The data type of the property; different data types have can only have specific data properties.
- 浮动
A numeric value with decimals e.g. 3.141, 5.0, or 6.125.
- Float Array
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.- 整数
A numeric value without any decimals e.g. 1, 2, 3, or 4.
- Integer Array
A collection of multiple integer data types e.g.
[1, 2, 3, 4]
.- 字符串型
A sequence of characters such as "Some Text".
- Python
Edit a Python data type directly, used for unsupported data types.
Note
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.
- Array Length
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.
- 属性名
The text that is displayed to the left of the value. This name is also used to access the property via Python.
- 默认值
This sets the default value of the property used by the Reset to Default Value operator.
Warning
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.
- 最小值,最大值
The minimum/maximum value the custom property can take.
- 库是否可覆盖
Allow the property to be overridden when the data-block is linked.
- 使用软限制
开启通过滑块调整 属性值 的限制,而无需以数字方式输入值。
- Soft Min, Max
The minimum/maximum value for the soft limit.
- 步长
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.
- 精度
The number of digits after the decimal to display in the user interface for float data types.
- 子类型
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.
- Plane Data
Data values do not have any special behavior.
- Linear Color
Color in linear color space.
- Gamma-Corrected Color
Color in gamma corrected color space.
- 欧拉角度
Euler Rotation angles.
- Quaternion Angles
Quaternion Rotation angles.
- 描述
允许你为你的自定义属性编写 提示。
Python 脚本访问
可以通过与 字典 类似的方式访问自定义属性,其中键值只能是字符串,而值只能是字符串,数字,数组或嵌套属性。
See the API documentation for details.