Go to: Synopsis. Return value. Keywords. Related. Flags. Python examples.

Synopsis

relationship([b=boolean], [relationshipData=string])

Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.

relationship is undoable, queryable, and editable.

This is primarily for use with file IO. Rather than write out the specific attributes/connections required to maintain a relationship, a description of the related nodes/plugs is written instead. The relationship must have an owner node, and have a specific type. During file read, maya will make the connections and/or set the data necessary to represent the realtionship in the dependency graph.

Return value

None

In query mode, return type is based on queried flag.

Keywords

relationship, lightLinker

Related

connectAttr, setAttr

Flags

b, relationshipData
Long name (short name) Argument types Properties
b(b) boolean createqueryedit
Break the specified relationship instead of creating it
relationshipData(rd) string createqueryeditmultiuse
Provide relationship data to be used when creating the relationship.

Flag can appear in Create mode of command Flag can appear in Edit mode of command
Flag can appear in Query mode of command Flag can have multiple arguments, passed either as a tuple or a list.

Python examples

import maya.cmds as cmds

cmds.relationship('ignore', 'lightLinker1', 'pCube1', 'pointLight1')