Publishing multiple attributes to a single published name
 
 
 

Unlike the doors, a fire truck’s wheels are expected to move together. For example, the wheels on the front and back axles should spin together, and the front wheels should turn together. To do this, you need to create a custom attribute to control both components at once. Then you can publish your custom attribute to the asset.

To turn the front wheels together

  1. In the Outliner, expand Axles_GRP, then select Wheels_GRP.
  2. Open the Attribute Editor by clicking .
  3. Make sure the Wheels_GRP tab is currently active, then in the Attribute Editor, select Attributes > Add Attributes.

    The Add Attribute window appears.

  4. Set Long Name to Front_wheel_turn.
  5. Set Minimum to -30 and Maximum to 30.
  6. Click Add.

    Maya adds the new attribute to Wheels_GRP in the Extra Attributes section of the Attribute Editor. The Add Attribute window stays open.

  7. Repeat steps 4 to 6 setting Long Name to Wheel_spin. Do not set a Minimum/Maximum value for this attribute.
  8. Click Close.

Your custom attributes can be found in the Extra Attributes section of the Attribute Editor. However, if you modify their values, nothing happens. This is because you have not connected them to anything yet.

To make the front wheels turn together

  1. Open the Connection Editor by selecting Windows > General Editors > Connection Editor.
  2. In the Connection Editor, Wheels_GRP should already be displayed in the Output section. If it is not, select Wheels_GRP in the Outliner and click Reload Left in the Connections Editor.
    Note

    If Outputs does not appear over the left column in the Connections Editor, click the to <- from button to reset its position.

  3. Scroll to the bottom of the left column and select Front_wheel_turn.
  4. In the Outliner, expand Wheels_GRP and select Wheel_f_l_GRP.
  5. In the Connection Editor, click Reload Right.

    The right column is filled with the left wheel’s attributes.

  6. In the right column, expand rotate and select rotateY.

    Maya connects the two attributes.

  7. In the Outliner, select Wheel_f_r_GRP and repeat steps 5 and 6.

If you adjust the value of Front_wheel_turn, both front wheels turn together.

Next you need to make the front and rear wheels spin in unison.

To make the front and back wheels spin together

  1. In the Connection Editor, select Wheel_Spin in the left column.
  2. In the Outliner, select Wheel_f_l_GRP.
  3. In the Connection Editor, click Reload Right.
  4. In the right column, expand rotate and select rotateX.
  5. Repeat steps 2-4 for the other 3 wheels.

Now if you adjust the value of the wheel_spin attribute in the Attribute Editor or Channel Box, all four wheels spin in unison. Although, in some cases, it’s useful for the front and back wheels to be able to spin at different rates, the current setup is fine for this tutorial.

Now you can publish your custom attribute to the container. You can do this directly from the Attribute Editor.

To publish the wheel turn and wheel spin

  1. In the Attribute Editor, -click Front Wheel Turn and select Publish to ‘Fire_truck_AST’ from the marking menu.
  2. Return to the Wheels_GRP node, -click Wheel Spin, and select Publish to ‘Fire_truck_AST’ from the marking menu.

Both attributes are published to the fire truck asset with the same published names as their corresponding custom attributes.