Skip to content

Instantly share code, notes, and snippets.

View martin-chatterjee's full-sized avatar

Martin Chatterjee martin-chatterjee

View GitHub Profile
@martin-chatterjee
martin-chatterjee / README.md
Last active September 1, 2016 14:31 — forked from mottosso/README.md
Restore Script Editor focus

Problem

image

On Windows systems using Autodesk Maya, the text input field of the Script Editor doesn't regain focus after having restored focus to the main window. This event handler explicitly restores focus, if it turns out to have been the last active panel at the time of leaving the application.

Usage

Place the full contents of the script below into your userSetup.py and never again lose focus.