Digital humans the art of the digital double
Ever wanted to know how digital doubles are created in the movie industry? This course will give you an insight into how it's done.
# 1 22-01-2019 , 03:37 AM
Registered User
Join Date: Jan 2019
Posts: 2

A way to open/close a window by a single hotkey

Hi everyone!
I'm new to scripting in Maya, so my apologies if thats a stupid question but I can't find any working solution for me in Google.
I've recently tried to customise my UI and I encountered a problem. I wanted to make Tool Settings to appear by a hotkey, and if the window is already opened, to close it. First I tried to make a hotkey for Tool Settings window itself, but it only opens it, I can't close it that way. Next I tried to write a simple script to do this, but I can't find any way to close a window in either MEL or Python. Is there any expression to close this particular window?
Many thanks in advance!

# 2 23-01-2019 , 12:25 AM
Registered User
Join Date: Jan 2019
Posts: 2
I was finally able to find it. If anyone's intrested, this is the expression:

ToggleToolSettings;
getUIComponentDockControl("Tool Settings", false);

Posting Rules Forum Rules
You may not post new threads | You may not post replies | You may not post attachments | You may not edit your posts | BB code is On | Smilies are On | [IMG] code is On | HTML code is Off

Similar Threads