// =========================================================================== // 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. // =========================================================================== // // // // // // getCurrentContainer // // // string (container name or "None" if no current container) // // // // // This script returns the current container, or the string "None" // if there is no current container. The container command can also be // used to query the container using the syntax: "container -q -current", // however it returns an empty string when there is no current container. // // Note: This is intended to be used for UI purposes so the return // string of "None" will be the localized string meaning "None" for // non-English versions of Maya. // // // none // // // // get the current container // getCurrentContainer; // // // global proc string getCurrentContainer() { string $current = (uiRes("m_getCurrentContainer.kNone")); string $container = `container -q -current`; if (size($container) > 0) { $current = $container; } return $current; }