// =========================================================================== // Copyright 2018 Autodesk, Inc. All rights reserved. // // Use of this software is subject to the terms of the Autodesk license // agreement provided at the time of installation or download, or which // otherwise accompanies this software in either electronic or hard copy form. // =========================================================================== // // Creation Date: April 2009 // // Description: // This script updates the connections between a shot and its image plane. // editor. // // Input Arguments: // None. // // Return Value: // None. // // Note: // None. // global proc int updateShotState( string $shot ) { $camera = getShotsCamera($shot); if ($camera == "") return false; string $ip, $existingIP[] = getCamerasImagePlanes($camera); string $fp = getShotsClip( $shot ); // Disconnect the image planes that aren't the shot's clip. int $alreadyConnected = false; for ($ip in $existingIP) { if ($ip == $fp) $alreadyConnected = true; else disconnectAttr -na ($ip + ".message ") ( $camera + ".imagePlane"); } if ((!$alreadyConnected) && ($fp != "")) connectAttr -nextAvailable ($fp + ".message") ($camera + ".imagePlane"); return true; }