// =========================================================================== // 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 script creates the DG Traversal menu items. // global proc createTraversalMenuItems(string $parent, string $item) // // Creates a menu on the toolbar that shows both the inputs and the outputs // and allows dg traversal. // { // Delete all menu entries currently in the popup // popupMenu -e -dai $parent; setParent -menu $parent; string $format = (uiRes("m_createTraversalMenuItems.kSelectNode")); string $label = `format -stringArg $item $format`; menuItem -c ("select -r " + $item ) -label $label; // Add container selection if applicable // string $container = `container -q -fc $item`; if( $container != "" ){ $label = `format -stringArg $container $format`; menuItem -c ("select -r " + $container) -label $label; } // Show history & future // dgHistoryPopupFill( $item, false ); dgHistoryPopupFill( $item, true ); }