// =========================================================================== // 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: December 2012 // // // Procedure Name: // doHideObjects // // Description: // Hide the selected or unselected object(s). // // Input Arguments: // int $selected - If true hide the selected objects. // If false hide the unselected objects. // global proc doHideObjects( int $selected ) { string $objs[]; string $msgIvm; int $invertComponents = 0; // Are we hiding the selected or unselected objects? if ( $selected ) { $objs = `ls -sl`; if (size($objs) != 0) { if ( `selectMode -q -co` ) $msgIvm = (uiRes("m_doHideObjects.kIvmHideSelectedComponents")); else $msgIvm = (uiRes("m_doHideObjects.kIvmHideSelected")); } else { $msgIvm = (uiRes("m_doHideObjects.kIvmInvalidSelected")); } } else { if ( `selectMode -q -co` ) { $invertComponents = 1; $objs = `ls -sl`; if (size($objs) != 0) { $msgIvm = (uiRes("m_doHideObjects.kIvmHideUnselectedComponents")); } else { $msgIvm = (uiRes("m_doHideObjects.kIvmInvalidUnSelectedComponents")); } } else { $objs = `listUnselected`; if (size($objs) != 0) { $msgIvm = (uiRes("m_doHideObjects.kIvmHideUnselected")); } else { $msgIvm = (uiRes("m_doHideObjects.kIvmInvalidUnSelected")); } } } // Perform the actual hide command (remembering the list of objects we hid) // and then display an in-view message. hideKeepSelection( $objs, $invertComponents ); inViewMessage -amg $msgIvm -fade; }