...
Specifies the name of the attribute that corresponds to this parameter. There are many reasons to use these attribute - parameter mapping: because the software or OSL imposes restrictions (e.g. an attribute named "color" in Maya, which is a reserved word in OSL), because the shader has different parameter naming conventions than what is expected in the software, or because the required attribute in the software is part of a complex attribute structure that does not have an OSL counterpart.
The maya_attribute
metadata is is Maya-specific and overrides attribute
.The , whereas katana_attribute
metadata is is Katana-specific and overrides attribute
.
When none of the above metadata are provided, the parameter name is used directly to define the attribute name.
...
Specifies the attribute name to use in the user interface, when possible. This will be used in the Maya editors, notably the Node Editor and the Channel Box. It will also be used for the automatically generated Attribute Editor template, unless label
is specified.
string type
Specifies the type of the attribute related to this shader parameter. By default, the attribute type is derived from the parameter type and the widget type.
bool
Valid for integer shader parameters.
enum
Valid for integer shader parameters. The enumeration list should be set using the options metadata.
message
Maya-specific. Valid for string shader parameters. A message attribute will be created and the connected node's name will be passed as this shader parameter's value.
string label
Specifies the label of the widget that controls the attribute.
string widget
Defines the type of widget to control the attribute's value.
mapper
checkBox
maya_colorRamp
maya_floatRamp
float min,
float max
int min,
int max
...
Specifies the range of of the slider widget that controls the attribute. This is ignored in Katana.
string page
Defines the name of a group under which the widget of the attribute will be placed.
string options
This metadata provides extra options. The enumerand values for
else if(meta.name == "options")
else if(meta.name == "widget")
{
index = StringMetadata::widget;
}
else if(meta.name == "niceName")
{
index = StringMetadata::niceName;
}
else if(meta.name == "related_to_widget")
{
index = StringMetadata::relatedToWidget;
}
else if(meta.name == "defaultColorSpace")
string maya_type
Specifies the type of the Maya attribute related to the shader parameter. For now, only bool
is supported to display an integer parameter as a checkbox.
...