// =========================================================================== // 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: May 13, 1997 // // Procedure Name: // AEcameraImagePlaneNew // // Description: // Creates the custom attribute editor controls for the camera // image plane creation // // Input Value: // nodeName // imagePlane // horizontalFilmAperture // verticalFilmAperture // // Output Value: // None // // // Procedure Name: // AEcameraImagePlaneReplace // // global proc AEcameraImagePlaneReplace(string $ip, string $hfa, string $vfa) { button -e -command ("AEcameraImagePlaneCommand "+ $ip + " " + $hfa + " " + $vfa) addImagePlaneButton; symbolButton -e -command ("{ string $i[] = `listConnections "+$ip+"`; "+ "if (size($i) > 0) showEditor $i[0]; }") propagateBtn; popupMenu -e -postMenuCommand ("AEcameraImagePlaneMenu propagateMenu "+$ip) propagateMenu; } // // Procedure Name: // AEcameraImagePlaneCommand // // global proc AEcameraImagePlaneCommand(string $ip, string $hfa, string $vfa) { string $cameraName[]; tokenize( $ip, ".", $cameraName ); // create imageplane shape. string $newImagePlane[] = createImagePlane($cameraName[0]); } global proc AEcameraImagePlaneNew (string $ip, string $hfa, string $vfa) { setUITemplate -pst attributeEditorTemplate; rowLayout -nc 3; text -label (uiRes("m_AEcameraImagePlaneNew.kImagePlane")) ; button -label (uiRes("m_AEcameraImagePlaneNew.kCreate")) addImagePlaneButton; symbolButton -image "inArrow.png" propagateBtn; popupMenu -parent propagateBtn -button 3 propagateMenu; setParent -m ..; setParent ..; setUITemplate -ppt; AEcameraImagePlaneReplace $ip $hfa $vfa; } // // Procedure Name: // AEcameraImagePlaneMenu // // Description: // Procedure to build the propagate menu of image planes. // global proc AEcameraImagePlaneMenu( string $parent, string $ipAttr ) { popupMenu -e -deleteAllItems $parent; setParent -m $parent; string $imagePlanes[] = `listConnections $ipAttr`; for ($item in $imagePlanes) { menuItem -label $item -command ("showEditor "+$item); } }