//  Script: senToggleIsolateSelect 0.1
//  Updated: 19 May 2006
//  Compatibility: Maya 7 and higher
//  Probably works with earlier versions, too.
//  Written by Sven-Erik Neve
//  Website and contact info: www.seneve.de
//  Bugs, comments, questions or suggestions? Get in touch!
//  Inspired by Jorge Pimentel's Isolate Select ShelfButton 1.1:
//  http://www.highend3d.com/users/56797.html
//  Also inspired by Eric Pavey
//  http://mayamel.tiddlyspot.com/
//  Usage:
//  Select what you'd like to isolate and focus a viewport
//  (for example middle mouse-click anywhere in a viewport).
//  Run the script by executing the senToggleIsolateSelect
//  command.
//  Installation:
//  Copy this source code within a MEL file to one of your
//  scripts folders, for example on Windows XP 32-bit to the
//  folder \My Documents\maya\<version>\scripts. Start Maya
//  or (if it is running) use the rehash command to make Maya
//  aware of the newly copied script. Execute the script with
//  the senToggleIsolateSelect command.
//  Purpose:
//  Isolate mode helps you concetrate on one part of a scene.
//  It's an alternative to hiding and unhiding objects.
//  By default you toggle Isolate mode separately for each
//  viewport in the viewports' Show menu. This script eases
//  isolating and unisolating. Firstly, it cuts down on the
//  need to use a menu. Secondly, it toggles Isolate mode
//  for all viewports at once, not just for one. Lastly, the
//  script allows newly created objects to be visible even
//  when Isolate mode is active.

global proc senToggleIsolateSelect() {
	// Is a model panel focused? If it is, go on.
	string $focusedPanel = `getPanel -wf`;
	if (`getPanel -to $focusedPanel` == "modelPanel")
		// Check Isolate setting, get list of model panels.
		int $isoValue = `isolateSelect -q -s $focusedPanel`;
		string $modelPanels[] = `getPanel -typ modelPanel`;
			// Toogle Isolate mode for all model panels.
			for ($element in $modelPanels)
				isolateSelect -s (!$isoValue) $element;
				if ($isoValue) isolateSelect -rs $element;
				else isolateSelect -as $element;
			// Allow newly created objects to be visible.
			isoSelectAutoAddNewObjs $focusedPanel (!$isoValue);

senToggleIsolateSelect MEL-Skript. Dieses Skript schaltet den Isolate-Modus für die aktuelle Auswahl an und aus. Zuerst stellt es den Status des Isolate-Modus im aktuellen Panel fest und speichert eine Liste aller Panels vom Typ modelPanel in der Szene. Anschließend schaltet es den Isolate-Modus um. Zum Schluss erlaubt das Skript neu erstellten Objekten, automatisch sichtbar zu sein.

Besonderer Dank gebührt Jorge Pimentel und Eric Pavey, deren Arbeit das Skript inspirierte, speziell Jorges Isolate Select ShelfButton und Erics MEL-Wiki.

Dieses Skript herunterladen (1,2 KiByte)
Maya 7 oder höher, funktioniert vermutlich auch mit früheren Versionen.