Customize the list of light attributes in the Light Editor

You can customize the list of attributes published for each light in the Light Editor by modifying the corresponding LE*Template.xml file for each light (for example, LEareaLightTemplate.xml).

Template files can be found in the ../scripts/AETemplates folder of your installation directory and are prefixed with LE.

Alternatively, you can also set the MAYA_CUSTOM_TEMPLATE_PATH environment variable, similar to how you would customize the display of attributes in the Attribute Editor. See Attribute Editor templates.

In order for an attribute to be published and editable in the Light Editor, you must add it to the template file of each applicable light type. For example, to provide the ability to edit Shadow Color on all Maya light sources, you must add this attribute to the XML template file for each Maya light source.

To add a light attribute to the Light Editor

  1. Declare the light attribute(s) in the first section of the template .xml file as follows:
    <!-- 
    Declaration of the attributes that should be visible for this light type in the Light Editor.
    -->
    ...
    ...
    <attribute name='shadowColor' type='maya.float3'>
        <label>Shadow Color</label>;
    </attribute>
    <attribute name='coneAngle' type='maya.float'>
        <label>Cone Angle</label>;
    </attribute>
    Note: You can find light attribute names by referring to the Nodes documentation in the Technical Documentation section of the Maya Help.
  2. Add the light attribute(s) to the template view section (last section) of the template .xml file as follows:
    <description>View used by Light Editor</description>
    ...
    ...
    <property name='shadowColor'/>
    <property name='coneAngle'/>
Note: To remove a column from the Light Editor, you must remove the corresponding light attribute from each of the templates in which it appears. It is not necessary to edit the LEapi*Template.xml files.

Create a single column for two different attributes

Column names and the underlying attribute names are separate, and you can create a single column for two different attributes. This allows for better organization and fewer columns in the Light Editor.

For example, if you edit the Maya spot light template by adding a column for the attribute useRayTraceShadows, and name it Shadows:

<attribute name='useRayTraceShadows' type='maya.bool'>
    <label>Shadows</label>
</attribute>

Then you edit the Arnold for Maya aiAreaLight template and add a column for the attribute aiCastShadows, and also name it Shadows:

<attribute name='aiCastShadows' type='maya.bool'>
    <label>Shadows</label>
</attribute>

The Light Editor now appears with one additional Shadows column, through which you can adjust the useRayTraceShadows attribute for Maya spot lights and the aiCastShadows for aiAreaLights.