In addition to updating a binding set from Maya, you can also manually add binding properties to or edit existing binding entries of a template binding set from an external XML editor.
By default, the XML template files you create are saved in the assets sub-directory of your current project.
For detailed information on the XML elements allowed within a binding set definition, see Binding Set elements.
You can also use the above method to create additional binding sets by copying and pasting the structure of the existing binding set and giving it a new name. However, Maya’s Autobind feature always uses the binding set with the name “MayaBindings”. You must create a custom mel script to apply binding sets with other names.
When defining conditions for binding sets, you can use regular expressions to fill in for attribute names that you don’t know or to account for a range of attribute names that follow a specific naming convention. For example, consider the following binding set:
<bindingset name=”VehicleBindingSet” template=”Vehicle”> <binding property=”Color” condition=”.+(\.color)”/> </bindingset>
The regular expression “.+(\.color)” matches all strings ending in “.color” and can be broken down into the following components:
Thus when the template is bound using this binding set, any attribute whose name ends with “.color” is bound to the Color published name.
Regular expressions for binding sets follow PERL syntax, which can be found here.
Except where otherwise noted, this work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License