I don't think Maya keeps a history of panels like that. I think you could set up a scriptJob to track every time a panel is changed, setting $currentPanel to $previousPanel each time. It sounds a bit overkill to have that running all the time though. Perhaps there's a different approach for what you're wanting to script?…
Hello ! :) I'm trying to get the Camera's name of an active View ( like "persp" or "Camera5" ). string $activeView = `getPanel -withFocus`; string $camName = `modelPanel -q -cam $activeView`; print $camName; So far, it works well. But I would like to detect if the focused panel have a working camera, and if not, get the…