Читать книгу Blender For Dummies - Jason van Gumster - Страница 94

Establishing parent-child relationships between objects

Оглавление

Creating parent-child relationships between objects, or parenting in Blenderese, organizes the objects hierarchically. An object can have any number of children, but no object can have more than a single parent. To make an object a parent, follow these steps:

1 Select the objects you want to be children.They don’t have to be of the same type.

2 Make your last selection (the active object) the object that you want to become the parent.

3 Choose Object ⇒ Parent ⇒ Object in the 3D Viewport’s header menu or use the Ctrl+P ⇒ Object hotkey combination.After you confirm the operation by left-clicking or pressing Enter, Blender adds a dotted line from the origin of each child object to the origin of the parent. Now when you select just the parent object and perform a transform operation on it, it affects each of its children. However, if you select a child object and transform it, none of the other children or the parent object is influenced.

A good mnemonic device for remembering the correct order for selecting objects when you want to create a parent-child relationship is to think of the order people get off of a boat when they’re abandoning ship: “Children first!”

Parenting is a great way to organize a set of objects that have a clear hierarchy. For example, say that you’ve modeled a dinner table and the chairs to go around it. Now you want to place that table and chairs in a room, but the room is scaled much smaller than the table and chairs. Rather than select, scale, grab, and move each object into place, you can parent each of the chairs to the table. Then you can just select and transform the table. When you do so, all the chairs transform right along with it, as if they were a single object! Woohoo!

To clear a parent relationship, the process is only two steps:

1 Select the child object that you want to remove from the hierarchy.

2 Choose Object ⇒ Parent ⇒ Clear Parent in the 3D Viewport’s header or press Alt+P to clear the parent relationship.If you use the hotkey, you see a pop-up menu with three options:Clear Parent: This option removes the parent-child relationship between your selected object and its parent. If the parent object was transformed after the parenting took place, the cleared child jumps back to the position, scale, and rotation that it was in before it was parented.Clear and Keep Transformation: This option behaves the same as Clear Parent, except any transformations that were made while the selected object was a child are applied. This means that the cleared child does not snap back to its original pre-parented state. Aside from the dashed relationship line between the former child and parent disappearing, nothing should appear to change in your 3D scene.Clear Parent Inverse: This option is a bit tricky to understand. It actually does not remove the link between the selected child object and its parent. Instead, it basically clears the parent’s transformation from the child. Clear Parent Inverse is handy for situations where you’ve transformed an object before parenting it, and you want it to relate to the parent as if it had not been transformed prior to parenting. To be honest, I don’t use this option very often, but it’s certainly good to have around when you need it.

Another quick way of parenting within Blender is from the Outliner. But in order to do this parenting operation, you need to change the Outliner’s display mode. By default, the Outliner uses the View Layer display mode. To change its display mode, click the Display Mode drop-down menu at the top of the Outliner. In this case you want to choose the Scenes display mode. Now, from the Scenes display mode of the Outliner, you can left-click the icon of any object and drag it over the name of another object in the Outliner (essentially dropping it in like copying a file into a folder on your computer’s file browser). That action automatically creates a parent-child relationship between the two objects. On complex scenes, this is an extremely handy trick.

Many game engines and other 3D applications have a notion of grouping that’s very different from how Blender works. They tend to treat all members of a group as a single unit, regardless of which one gets selected. They also tend to treat groups hierarchically; an object can only belong to one group (in turn, that group can be a member of another group, but the base object is still only a member of one). In fact, this behavior is a lot more like Blender’s parenting. To mimic this behavior more seamlessly, follow these steps:

1 Create an Empty object near the center of your “grouping” of objects and display it as a cube (Add ⇒ Empty ⇒ Cube).

2 Adjust the size of the Empty from the Last Operator panel (it’s the Radius value) to roughly include all the objects in your grouping.

3 Name the Empty something clever to indicate the grouping’s name.

4 Make all objects you’re grouping a child of the Empty (select each object, select the Empty, Ctrl+P ⇒ Object).

With this bit of legwork done, you can select the Empty’s cube outline to transform your whole grouping. Even better, your grouping will be hierarchically organized in the Scenes display mode of the Outliner. Many game-engine export scripts properly recognize and translate this structure to their native means of grouping.

Blender For Dummies

Подняться наверх