// =========================================================================== // 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. // =========================================================================== global proc selectContainerContents() { string $containers[] = `ls -sl -containers`; if (size($containers) == 0) { $containers[0]= `container -q -current`; } if (size($containers[0]) == 0) { error( (uiRes("m_selectContainerContents.kMustSelectContainer"))); } select -d; for ($container in $containers) { if( `getAttr ($container+".blackBox")` ){ string $publishedNodes[] = getPublishedNodes( $container ); string $format; if( size($publishedNodes) ){ select -add $publishedNodes; $format = (uiRes("m_selectContainerContents.kBlackBoxContainer")); } else { $format = (uiRes("m_selectContainerContents.kBlackBoxNoPublish")); } string $warnMsg = `format -s $container $format`; warning($warnMsg); } else { string $nodes[] = `container -q -nl $container`; if (size($nodes) > 0) { select -add $nodes; } } } }