Tuesday 20 October 2020

Disable viewport while running code

 Hello hello,

I just found a really cool bit of code to temporarily disable the Maya viewport whilst running code. Very useful for potentially 'heavy' stuff like caching, baking etc:


cmds.refresh(suspend=True)
doYourFunc()
cmds.refresh(suspend=False)