Screenshot viewport delay

54 views
Skip to first unread message

Shobhit Khinvasara

unread,
Mar 14, 2018, 3:57:25 PM3/14/18
to Python Programming for Autodesk Maya
Hey everyone,

I am currently writing a rig/deformation testing tool for Maya, where the user first defines the screen capture area and then the tool goes through a dictionary list of Objects, Attributes and Values, changes the camera to the view you set and takes a screenshot. Currently I am running into an issue where the screenshot capture happens but I don't see any change in the viewport, even though printing a getAttr for the value before taking the screenshot is what you expect. I feel that the screenshot happens before the viewport updates and introducing time.sleep before and after taking the screenshot doesn't help. Any clues?

I can post code snippets on demand.

Thanks Everyone!
Shobhit

Shobhit Khinvasara

unread,
Mar 14, 2018, 3:58:09 PM3/14/18
to Python Programming for Autodesk Maya
I am using Maya 2017.

Michael Boon

unread,
Mar 15, 2018, 12:32:40 AM3/15/18
to Python Programming for Autodesk Maya
I would look into the commands refresh, and evalDeferred
I expect one (or both) of them will get you what you want.

Shobhit Khinvasara

unread,
Mar 15, 2018, 12:03:39 PM3/15/18
to Python Programming for Autodesk Maya
Yes refresh works as expected!
Thank you
Reply all
Reply to author
Forward
0 new messages