Often I do a 'tear off copy' command to make a 2nd viewport and then I usually hide manipulators and curves in the copy. I want to make a script that will do that in one command, I have all the parts really, but I can't seem to get the name of the new panel.
For example. I do this :
string $oldPanel = `getPanel -wf`;
string $newPanel =`tearOffCopyItemCmd modelPanel $oldPanel;
But since the 'tearOffCopyItemCmd' is a script and has no option I can see to set the name I'm stuck, I tried using something like string $panelsVis=`getPanel -vis' to find the new panel, but it doesn't seem to work until after the script has run, ie if I run it during the script it only returns the original one.
I'm sure it's something simple.. any ideas appreciated.