// =========================================================================== // 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: June 30, 1997 // // Procedure Name: // cameraImagePlaneUpdate // // Description: // Initialize an image plane for a camera. // // Input Value: // camera - name of the camera to attach image plane to // imagePlane - name of the image plane // // Output Value: // None // // // Procedure Name: // updatePort // global proc cameraImagePlaneUpdate( string $camera, string $imagePlane ) { connectAttr -nextAvailable ($imagePlane+".message") ($camera+".imagePlane"); setAttr ($imagePlane+".lockedToCamera") (!`getAttr ($camera+".orthographic")`); setAttr ($imagePlane+".sizeX") `getAttr ($camera+".horizontalFilmAperture")`; setAttr ($imagePlane+".sizeY") `getAttr ($camera+".verticalFilmAperture")`; setAttr ($imagePlane+".width") `getAttr ($camera+".orthographicWidth")`; setAttr ($imagePlane+".height") `getAttr ($camera+".orthographicWidth")`; float $coi[] = `camera -q -worldCenterOfInterest $camera`; setAttr ($imagePlane+".imageCenter") -type "double3" $coi[0] $coi[1] $coi[2]; // Ensure the image plane outline is drawn and selectable. string $parents[] = `listRelatives -parent $camera`; for ($item in $parents) showHidden -below $item; }