Additional Attributes

The AttributeManger will be not available any more starting with version 0.06 (from 09/11/2011). The Attributes will be automatically added during plugin initilisation.

At the moment this means that you will loose the attributes if you open the scene in a maya where the plugin is not available. This is a limiation of the exended attributes in the current maya version.

Just in case you may read the old version:

Sometimes we have some additional attributes for objects in maya that can not necessarily manipulated with the Attribute Manager.

In the main menu appears a Menu called Mantra as you can see here:

Here you can open the Attribute Manager window:

With this window, you can select in the upper part the attributes types you want to assign, in the lower part you have some buttons to assign or remove attributes.

The workflow is quite simple: You select the object you want to assign new attribute to, select the type in the window and press Assign Selected Attributes. You can select a attribute itself as shown in the image or simply select the parent level, e.g. shader. Then all the shader attributes will be added to the currently selected shader. You can select an object itself to add attributes to or select whole hierarchies. In this case all the child objects will receive the attributes.

Lets say you want a mesh object render as a subdivision surface. In this case you can select your object, open the window, select mesh and press the Assign button. Thats all. The new attributes appears in the AttributeEditor in maya as you can see here:

The same procedure works for shaders. Normal phong shaders do not support blurred reflections or refractions. To do it you can add these attributes:

Set the values and render.

As an alternative or for attributes that are not yet supported by the attribute manager, you can add them by hand. Because I rely heavily on PyMel, I assume that you import pymel the following way:

import pymel.core as pm

At the moment there are a few attributes for different objects:

Render as Subdiv:
  • Select the shape node and add the attribute with:
  •  pm.SCENE.yourMeshShape.addAttr("mtm_renderAsSubdiv", at="bool")
Sampling Quality - this will increase area sampling quality:
  • Select the light shape and add:
  • pm.SCENE.yourLightShape.addAttr("mtm_samplingQuality")
Shadow Quality - this will increase shadowmap quality:
  • Select the light shape node and add attribute:
  • pm.SCENE.yourLightShape.addAttr("mtm_shadowQuality")
Evaluate surface shaders:
  • Select light shape and add:
  • pm.SCENE.areaLightShape1.addAttr("mtm_surfaceShaders", at="bool)
Visible light geometry:
  • Select light shape and add:
  • pm.SCENE.yourLightShape.addAttr("mtm_renderLightGeo", at="bool")