Publishing attributes
 
 
 

Now that the fire truck is encapsulated, you can publish attributes from the individual pieces to make them available at the container level.

A published attribute on a container is bound to an attribute of the object inside. When a user changes the published attribute’s value, the value of the corresponding internal attribute is changed as well. You can choose to publish all or only a subset of the available internal attributes, allowing you to limit how much access a user has to the object contained inside.

The published attributes of a container are often referred to as the container’s interface, and is useful because it allows you access to every important control for your asset in a single place.

To organize objects under their containers

  1. In the Outliner, select Display > Container Contents > Under Container.

    Now Fire_truck_GRP and its children appear under the Fire_truck_CNT object.

To publish the right cab door

  1. In the Outliner, expand Fire_truck_CNT by clicking next to its name.

    Fire_truck_GRP appears under Fire_truck_CNT.

  2. Expand Fire_truck_GRP, then Doors_GRP.
  3. Select Cab_door_f_r_GRP and open the Channel Box by clicking .
  4. In the Channel Box, under the Cab_door_f_r_GRP heading, + -click the label Door Open and select Publish to Container > from the marking-menu.

    The Publish Attribute Options window appears.

  5. In the Publish Attribute Options window, select Edit > Reset Settings.
  6. In the Attribute name section, select Custom name and then type Front_Right_Door in the Custom name field.

    The name Front Right Door represents the published name for this attribute and represents the door’s rotation in the fire truck container’s interface.

  7. Click Apply.

    The Front Right Door attribute now appears in the Fire_truck_CNT section of the Channel Box.

    Now, in the Attribute Editor or Channel Box you can input values into the Front Right Door field to open and close the door. Notice that as you change the value, the value of door_open under Doors_GRP changes to match. This is because your published name (Front_Right_door) is bound to the Rotate Y attribute of Cab_door_f_r_GRP. When one changes, both are updated.

  8. Repeat steps 3 - 7 to publish the following:
    Node Name Published name
    Cab_door_f_l_GRP Front_Left_Door
    Cab_door_r_r_GRP Rear_Right_Door
    Cab_door_r_l_GRP Rear_Left_Door
  9. Select Edit > Reset Settings.
  10. Click Close.
NoteThe Door Open attribute for each door is a custom attribute that controls the Y rotation of each door. Although you could publish the rotate Y attribute of each door directly, these custom attributes are provided so that each door opens as the value increases from 0 to 1. Without these attributes, some doors would open as their rotation increases and others would open as their rotation decreases.

You will learn how to create a custom attribute in the next section.