Show in Contents
Add to Favorites
Home: Autodesk Maya Online Help
Publishing attributes
Lesson 1: Setting up an asset
Open the second scene for the lesson
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 container.
To turn the front wheels together
- In the Outliner,
expand Axles_GRP, then select Wheels_GRP.
- Open the Attribute Editor by
clicking .
- Make sure the Wheels_GRP tab is currently
active, then in the Attribute Editor, select Attributes
> Add Attributes.
The Add
Attribute window appears.
- Under Numeric Attribute Properties,
set Long Name to Front_wheel_turn.
- Set Minimum to
-30 and Maximum to 30.
- 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.
- Repeat steps 4 to 6 setting Long
Name to Wheel_spin. Do not set a Minimum/Maximum value
for this attribute.
- 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
- Open the Connection Editor by
selecting
Windows
> General Editors > Connection Editor.
- 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.
NoteIf Outputs does not
appear over the left column in the Connections Editor,
click the to <- from button to reset
its position.
- Scroll to the bottom of the left column
and select Front_wheel_turn.
- In the Outliner,
expand Wheels_GRP and select Wheel_f_l_GRP.
- In the Connection Editor,
click Reload Right.
The right column is filled
with the left wheel’s attributes.
- In the right column, expand rotate and
select rotateY.
rotateY turns to italics
to signify that it has been connected.
- 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
- In the Connection Editor,
select Wheel_Spin in the left column and rotateX in the right column.
- In the Outliner,
select Wheel_f_l_GRP.
- In the Connection Editor,
click Reload Right.
- In the right column, expand rotate and
select rotateX.
- 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
- In the Attribute Editor, -click
Front Wheel Turn and select Publish to ‘Fire_truck_CNT’ from
the marking menu.
- -click
Wheel Spinand select Publish to ‘Fire_truck_CNT’ from the
marking menu.
Both attributes are published
to the fire truck container with the same published names as their
corresponding custom attributes.