Excerpt |
---|
Shader Meta-dataThe following attributes can be specified as shader meta-data. This kind of meta-data is specified between the shader name and its parameter list.
An array of strings that tag the shader. The supported tags are: surface displacement Classifies the shader as a surface shader or a displacement shader, respectively, in Katana. Tagging a shader with one of these values will have 3Delight for Katana create a Network Shader node along with the surface shader or displacement shader, and connect it appropriately. (Only shaders providing the proper tag will be listed as surface materials or displacement materials in a "material" node). lightfilter Classifies the shader as a light filter. (qu'est-ce que ça change au juste) environment Classifies the shader as an environment. (qu'est-ce que ça change au juste) hidden Providing the hidden tag will prevent the shader from appearing in the shading node layered menu that is shown in the node editor when pressing the "s" key (, and from the list of available shaders in a "material" node).
Specifies the type ID used for the node registration. The expected string value is the unique number in hexadecimal format, starting with The IDs from You can also request your own reserved node ID range to Autodesk, for free. This is also the recommended solution if you intend to share your nodes with users outside your studio. You may use any ID between
texture/2d texture/3d surface lens i Setting this meta-data to 0 indicates that no Attribute Editor template should be generated by 3Delight for Maya. You are then responsible for providing one. This meta-data is specific to 3Delight for Maya and is ignored elsewhere.
Specifies a string to be used in the user interface when referring to the shading node type name. This currently affects the labeling of the entries in the Create section of the Hypershade in Maya. Note that the node type name is set to the shader name. Shader Parameter Meta-dataThe following attributes can be specified for a given shader parameter. Attribute specification Meta-dataThe following meta-data provides details that are used when generating the attribute of the shading node that corresponds to a given shader parameter.
Specifies the name of the attribute for a given shader parameter. When none of the above meta-data are specified, the parameter name will be used directly as for the attribute name. While it is much simpler to simply choose shader parameter names that can be directly, sometimes the Maya or Katana conventions imply some specific name that is disallowed in OSL (e.g. a node attribute named The
Specifies the name of a shader to be connected to this shader parameter when no connection exists. The only supported value is
When this is set to a non-zero value, a Maya attribute will be defined for the given shader parameter, but it will not be shown in the Attribute Editor, Channel Box Editor, nor the Node Editor. If you only want to avoid getting a gadget for the parameter, see the
Defines the string to be used in the user interface when presenting the attribute. This will be shown in the Node Editor and the Channel Box Editor. It will also be used in the Attribute Editor, unless
Specifies the attribute type. Regular OSL parameter types are mapped automatically to the relevant attribute type and don't require type to be specified. This should be dropped? User Interface Meta-dataThe following meta-data provides details about the user interface presentation of the shader parameter.
|
...
Specifies |
...
a |
...
string that will be shown in a help box or tool tip.
The label of the gadget for the shader parameter. In Maya, this only has an effect in the Attribute Editor; if no label is specified, the niceName will be used if provided.
string lock_op
Define a lock operator, its left operand and its right operand, respectively. Lock operations allow the gadget to become insensitive or locked when the operator returns true. The various operators are listed here.
These only have an effect in Katana. int / float min
Define the minimum and maximum values of a numeric parameter, respectively. When both are defined, the attribute gadget will be made of a numeric field and a slider. In Maya, this configures the attribute with the specified hard minimum and / or maximum value. In Katana, there is no way to enforce minimum or maximum values on attributes. Having a slider shown helps providing information about the parameter's useful range of values. Providing only string options A string providing optional values for some
Specifies the name of a collapsable section that is used to group together related attributes. Nested pages can be defined by setting this metadata to a string containing the path to the given page. For instance:
Specifies the slider exponent. This only has an effect in Katana.
Define the range of values covered by the slider. In Katana, providing only one of
This meta-data should be set to 1 for parameters that specify a texture file name. string widget Specifies the type of gadget that will show the attribute's value(s). By default, a gadget appropriate for the attribute type is generated. In Maya, matrix attributes are not shown in the Attribute Editor. In Katana? . The following values are supported when it is required to override the default gadget:
The integer shader parameter will be presented as a checkbox. In Maya, this value will also cause a boolean attribute to be created instead of an integer one.
The string shader parameter will be presented as a text field with a browse button that produces a file browser dialog when clicked.
The integer shader parameter will be presented as an option menu with predefined menu items that each set a specific value. In Maya, this value will also cause an enum attribute to be created instead of an integer one. The list of labels and values are specified by the
No gadget will be offered for the attribute. Note that the attribute will still be defined.
The string shader parameter will be presented as an option menu with predefined menu items. The menu items are specified by the
The attribute is shown as a text field displaying the name of the connected node and a "mapper" button that brings up a windows allowing the user to select the type of a new node to create and connect to this attribute. This is only available in Maya. |
ramps colorRamp maya_floatRamp,
related_to_widget
(navigation, checkbox
options
A string providing optional values for some widget
values. See widget
above for details.
min
max
slidermin
slidermax
...
The attribute will be shown with a gadget suitable for defining a new scene graph location; the created location path is passed as the shader parameter value. This is only available in Katana. |