// =========================================================================== // 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. // =========================================================================== // Description: This procedure gives // . a list of hyper graph window with scene hierarchy view (i.e., DAG view), // . and a list of hyper graph window with input and output // connection view (i.e., DG view). // global proc hyperGraphWindowList( string $hyperGraphPanelsWithSceneHierarchy[], string $hyperGraphPanelsWithInputAndOutputConnection[]) { // Clear the lists. // $hyperGraphPanelsWithSceneHierarchy = {}; $hyperGraphPanelsWithInputAndOutputConnection = {}; // Get a list of hyper graph panels. // string $panelNames[] = `getPanel -scriptType hyperGraphPanel`; // Check which panel has which type of view. // string $panelName; int $sceneHierarchyViewCount = 0; int $inputOutputConnectionViewCount = 0; for ($panelName in $panelNames) { // Editor name. // string $editor = $panelName + "HyperGraphEd"; string $graphType = `hyperGraph -query -graphType $editor`; if ($graphType == "DAG") { $hyperGraphPanelsWithSceneHierarchy[$sceneHierarchyViewCount] = $panelName; $sceneHierarchyViewCount++; } else if ($graphType == "DG") { $hyperGraphPanelsWithInputAndOutputConnection[$inputOutputConnectionViewCount] = $panelName; $inputOutputConnectionViewCount++; } } }