物体父子关系

创建父级

参考

模式

物体模式

菜单

物体(Object) ‣ 父级(Parent)

快捷键

Ctrl-P

When modeling a complex object, such as a watch, you may choose to model the different parts as separate objects. Yet all the parts may be attached to each other. In these cases, you want to designate one object as the parent of all the children. Movement, rotation or scaling of the parent also affects the children.

要为物体设置父级,请至少选择两个物体(首先选择子物体,最后选择父物体),然后按 Ctrl-P 。将弹出 设置父级目标 菜单,允许你从几种可选的不同的父子类型中选择一种。选择 设置父级目标 中的一个条目进行确认,并创建父/子关系。

所选的最后一个物体将为活动物体 (以亮橙色表示),并且还将是父物体。如果你在选择父物体之前选定多个物体,则它们将全部是父物体的子物体,并且将处于层次结构的同一级别(它们是“同辈”)。

弹出的 设定父级目标 菜单是上下文相关(语境)的菜单,这意味着它显示的条目数量是根据使用 Ctrl-P 快捷方式时选择的物体不同而不同。

Moving, rotating or scaling the parent will also usually transform the child/children. Yet transforming the child/children of the parent will not affect the parent. In other words, the direction of influence is from parent to child and not child to parent.

In general when using Ctrl-P or 3D Viewport Header ‣ Object ‣ Parent to parent objects, the child objects can only have one parent object. If a child object already has a parent object and you give it another parent then Blender will remove the previous parent relationship.

父级反校正

当物体以 Ctrl-P 建立父子关系时,父对象的当前变换存储在隐藏的父级反校正矩阵中。 通过使用它,只要父级不移动,就可以继续在世界空间中有效地解释子级的位置、旋转和缩放属性。

For parenting without assigning the matrix, select the Without Inverse option in the Ctrl-P pop-up menu. This creates an alternative parent-child-relationship where child object’s properties are evaluated in the parent’s coordinate system. This is the better choice for CAD purposes, for example.

在建立父级关联后也可以用 清除父级反校正 来清理矩阵。

父级类型

Blender支持许多不同类型的父子关系,如下所示:

  • 物体

  • 骨骼

  • 顶点

  • 顶点 (基于三点)

设置

除了选择的物体父子关系之外,它还为子级物体添加了一个修改器或约束,并将父级作为目标物体或激活父级属性,例如 跟随路径

物体父级

物体父级 是Blender支持的最普遍的父子关系形式。如果使最后一个选定物体成为父级物体,而所有其他选定物体将成为子级物体。子级物体将继承父级物体的变换。父级物体可以是任何类型。

物体(保持变换)父级

物体(保持变换)父级 工作方式非常类似于 物体父级。 主要的区别在于子级物体是否会记住之前父级物体应用于它们的任何先前变换。

由于难于以简单易懂的技术方式来解释,所以使用示例来演示。

假设有一个由三个物体组成的场景,它们是名为“EmptyA”和“EmptyB”的两个空物体,以及一个猴头物体。图 没有父子关系的场景。 显示了三个没有父子关系的物体。

../../../_images/scene-layout_object_editing_parent_keep-transform-a.png

没有父子关系的场景。

If you select the Monkey object by LMB click and then Shift-LMB click “EmptyA” object and press Ctrl-P and finally select Object from the Set Parent To pop-up menu. This will result in “EmptyA” object being the parent object of the Monkey object. With only “EmptyA” selected rotating/scaling/moving it will result in the Monkey object being altered respectively.

缩放“EmptyA”物体,使猴头变小并向左移动一点。

../../../_images/scene-layout_object_editing_parent_keep-transform-b.png

猴头是“EmptyA”的子级物体。

If you select only the Monkey object by LMB click and then Shift-LMB click “EmptyB” object and press Ctrl-P and select Object from the Set Parent To pop-up menu. This will result in “EmptyB” object being the parent object of the Monkey object. Notice that when you change the parent of the Monkey the scale of the Monkey changed.

../../../_images/scene-layout_object_editing_parent_keep-transform-c.png

猴头是“EmptyB”的子级物体。

发生这种情况是因为猴头物体从来没有直接改变其缩放,之所以变化是因为它是“EmptyA”的子级物体,跟随其缩放发生了变化。由于“EmptyB”没有改变其缩放,因此将猴头的父级更改为“EmptyB”导致这些间接的缩放变化被移除。

This is often the required behavior, but it is also sometimes useful that if you change your parent object that the child object keep any previous transformations it got from the old parent object; If instead when changing the parent object of the Monkey from “EmptyA” to “EmptyB” we had chosen parenting type Object (Keep Transform), the Monkey would keep its scale information it obtained from the old parent “EmptyA” when it is assigned to the new parent “EmptyB”.

../../../_images/scene-layout_object_editing_parent_keep-transform-d.png

物体(保持变换)父级方法。

如果想继续了解上面的描述,这里是用于描述 物体(保持变换) 父级方法的blend文件:

文件:设置物体(保持变换)父级(演示).blend_(Demo_File).blend) 。

骨骼父级

骨骼父子关系允许将骨架上的某些骨骼设为另一个物体的父级物体。这意味着,当变换一个骨架时,子物体只会跟随着特定的骨骼移动。

../../../_images/scene-layout_object_editing_parent_bone1.png

有四个骨骼的骨架的三个图片。

在图 有四个骨骼的骨架的三个图片。 中,第二个骨骼是立方体物体的父级。立方体只有在第一或第二块骨骼的情况下才会变形。注意改变第三和第四根骨头对立方体没有影响。

To use bone parenting, you must first select all the child objects you wish to parent to a specific armature bone, then Shift-LMB select the armature object and switch it into Pose Mode and then select the specific bone you wish to be the parent bone by LMB selecting it. Once done press Ctrl-P and select bone from the Set Parent To pop-up menu.

现在在姿态模式下变换骨骼会导致子物体也会发生变换。

相对父子关系

骨骼相对父子关系是你可以为每个骨骼切换的选项。这和骨骼父子一样,但有一点不同。

使用骨骼父级时,如果将骨骼作为某些子物体的父级并选择该骨骼,然后将其切换为编辑模式并移动该骨骼,当在该骨骼上切换回姿态模式时,作为该骨骼的子物体将在姿态模式中吸附回骨骼的位置。

../../../_images/scene-layout_object_editing_parent_bone2.png

使用骨骼父级方法具有子级立方体物体的单个骨架骨骼。

在图 使用骨骼父级方法具有子级立方体物体的单个骨架骨骼。 中,第一张图片显示骨骼在编辑模式下移动之前立方体和骨架的位置。第二张照片显示了在编辑模式中选择骨骼,移动并切换回姿势模式后立方体和骨架的位置。注意,子级物体移动到姿态骨骼的新位置。

骨骼相对父子关系的工作方式则不同:如果在编辑模式下移动父级骨骼,当切换回姿势模式时,子物体将不会移动到姿势骨骼的新位置。

../../../_images/scene-layout_object_editing_parent_bone3.png

立方体使用相对父子链接到单一骨骼。

在图 立方体使用相对父子链接到单一骨骼。 中,第一张图片显示骨骼在编辑模式下移动之前立方体和骨架的位置。第二张照片显示了在编辑模式中选择骨骼后,移动并切换回姿势模式后立方体和骨架的位置。请注意,子物体不会移动到姿势骨骼的新位置。

Note

当使用 Ctrl-P 来设置父级时,选择”骨骼”或”相对骨骼”将分别清除和设置骨骼的”相对父子关系”选项。由于”相对父子关系”是每个骨骼设置的选项,这会同时影响该骨骼的所有子物体。

顶点父级

对于曲线、曲面、网格和晶格类型的物体,可以将其顶点或点用作其他物体的父级。你可以将一个物体设置父级到一个顶点或一组的三个顶点,这样,当父网格变形时,子级将会随之移动。

来自编辑模式的顶点父级

物体模式 中,选择子级,然后选择父级物体。 Tab 切换到 编辑模式 并在父物体上选择一个定义单个点的顶点,或者选择三个顶点定义一个区域(三个顶点不必形成一个完整的面;它们可以是父物体的任意三个顶点),然后按下 Ctrl-P 并确认。

此时,如果选择了单个顶点,则将从顶点向子级绘制关系/父子线。如果选择了三个顶点,则从(父级物体的)三个点的平均中心向子级绘制关系/父子线。现在,当父级网格形变并且所选父顶点移动时,子级也将移动。

来自物体模式的顶点父级

可以在物体模式下执行顶点父级,方法类似普通物体父级。在物体模式中按 Ctrl-P 并选择 顶点顶点(基于三点)

将从每个物体使用最近的顶点,这通常也是您想要的。

顶点父级示例。
../../../_images/scene-layout_object_editing_parent_object-mode-example-1.png

使用设置父级上下文菜单中的“顶点(基于三点)”,每个小立方体都可以自动设置父级为棱角球上附近顶点三元组。

../../../_images/scene-layout_object_editing_parent_object-mode-example-2.png

在编辑模式下重新塑造物体,意味着每个立方体都分别跟随其顶点父级变换。

../../../_images/scene-layout_object_editing_parent_object-mode-example-3.png

Scaling the parent icosphere in Object Mode means the child cubes are also scaled as expected.

设定父级上下文菜单项意味着用户可以快速设置大量顶点父级关系,并避免单独建立每个父——子顶点关系的繁琐工作。

Note

它实际上是一种“反转”的 钩挂

选项

移动子级

通过清除它的原点,你可以将一个子物体 移动 到它的父物体上。父级与子级之间的关系不受影响。选择子物体并按下 Alt-O。通过确认子物体将吸附到父级的位置。使用 大纲 视图来验证子物体是否仍然存在父级。

清空父级

参考

模式

物体模式

菜单

物体(Object) ‣ 父级(Parent)

快捷键

Alt-P

你可以通过 Alt-P 方式 删除 父级 - 子级关系。

清空父级

如果只选择组中的父级,则不做任何事情。如果选择了一个子级或多个子级,他们就会与父级分离,或者被释放,并且他们会返回他们原来的位置,旋转和大小。

清除并保持变换结果

从父级那里解散子级,但 保留 父级给他们的位置、旋转和大小。

参见 非均匀缩放 可能适用于这里。

清除父级反校正

与剔除父子层级关系不同,此选项是从选择的物体中清理掉 父级反校正 矩阵。有了这个清空的矩阵,子物体的位置、旋转、缩放属性可以在父物体的世界坐标里表现。

Hint

使用大纲视图

另一种观察组内父子关系的方式是使用 大纲编辑器大纲 视图。

已知局限

非均匀缩放

与其子级相比,父级的缩放和旋转不均匀可能会导致 剪切 效应。

虽然父子关系支持这种做法,但是当父级被清除后,剪切将会丢失,因为它不能用位置,缩放和旋转。

如果 清除并保持变换结果 移动物体,则非均匀缩放是最可能的原因。