Go to: Synopsis. Return value. Related. Flags. MEL examples.

Synopsis

stereoRigManager [-addRig string string string] [-cameraSetFunc string string] [-creationProcedure string string] [-defaultRig string] [-delete string] [-language string string] [-listRigs] [-rigDefinition string] objects

stereoRigManager is undoable, queryable, and NOT editable.

This command manages the set of stereo rig tools.

Return value

None

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

Related

camera

Flags

addRig, cameraSetFunc, creationProcedure, defaultRig, delete, language, listRigs, rigDefinition
Long name (short name) Argument types Properties
Database manipulation
-addRig(-add) string string string create
Adds a new stereo rig definition. This flag takes 3 arguments: name, language, create:
  • name: A unique name for the rig type.
  • lang: The language used for the callback. Valid values are "Python" and "MEL". Use the Python interface when possible.
  • create: Procedure used to create a new rig of this type. This procedure takes no argument, and must return an array of strings. The first element is the root DAG node of the rig. The second and third elements are respectively the left and right cameras.
-cameraSetFunc(-csf) string string create
Specifies the function to call when a rig is about to be added to a camera set. This function must be the same language as originally defined by the tool.
-creationProcedure(-cp) string string create
Changes the creation procedure of an existing rig definition. This flag takes 2 arguments: the name of the existing rig definition and the procedure.
-defaultRig(-dr) string createquery
Sets the default rig tool. The argument must be the name of one of the rigs added using the add flag. Returns True if the default could be set, False otherwise.
-delete(-d) string create
Removes the definition of a stereo rig. The argument must be the name of one of the rigs added using the add flag.
-language(-l) string string create
Changes the language of an existing rig definition. Valid values are "Python" and "MEL". This flag takes 2 arguments: the name of the existing rig definition and the language keyword.
Database query
-listRigs(-lr) create
When present, returns the list of all defined rigs. All other flags are ignored.
-rigDefinition(-rd) string create
Returns the definition of a rig, in the same format as the add flag. A string array containing lang, create cameraSet. If an empty string is passed as the argument, then the default rig is used.

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 be used more than once in a command.

MEL examples

// Make sure the stereo plug-in is loaded
loadPlugin -quiet "stereoCamera";

// Remember the default rig
string $defRigBefore =  `stereoRigManager -query -defaultRig`;

// Register new rig types, using MEL or Python implementations.
stereoRigManager -add "StereoCameraHier" "Python" "maya.app.stereo.stereoCameraHierarchicalRig.createRig";
stereoRigManager -add "StereoCameraMulti" "Python" "maya.app.stereo.stereoCameraComplexRig.createRig";
stereoRigManager -add "StereoCameraSimple" "MEL" "stereoCameraSimpleRig";

// Make the second one the default rig
stereoRigManager -defaultRig "StereoCameraMulti";

// Remove it
stereoRigManager -delete "StereoCameraMulti";

// Query the default rig.
string $defRig = `stereoRigManager -query -defaultRig`;
print ("Default rig is now \""+$defRig+"\"\n");

// Print the definition of each rig type
string $rigs[] = `stereoRigManager -listRigs`;
string $rig;
for ($rig in $rigs) {
  string $defs[] = `stereoRigManager -rigDefinition $rig`;
  print ("Rig \""+$rig+"\": (language "+$defs[0]+") create callback: "+$defs[1]+"\n");
}

// Cleanup after we are done
stereoRigManager -delete "myDefaultRig";
stereoRigManager -delete "mySimpleRig";
stereoRigManager -defaultRig $defRigBefore;

print "After cleanup\n";

$defRig = `stereoRigManager -query -defaultRig`;
print ("Default rig is now \""+$defRig+"\"\n");
$rigs = `stereoRigManager -listRigs`;
for ($rig in $rigs) {
  string $defs[] = `stereoRigManager -rigDefinition $rig`;
  print ("Rig \""+$rig+"\": (language "+$defs[0]+") create callback: "+$defs[1]+"\n");
}