Announcements

Between mid-October and November, the content on AREA will be relocated to the Autodesk Community M&E Hub and the Autodesk Community Gallery. Learn more HERE.

Determine if Maya is currently in the middle of updating viewport

Determine if Maya is currently in the middle of updating viewport

icapathos
Advocate Advocate
916 Views
3 Replies
Message 1 of 4

Determine if Maya is currently in the middle of updating viewport

icapathos
Advocate
Advocate

I want to run custom script regularly, but it crashed after referencing a bundle of files,

I suspect the point that after referencing Maya is updating viewport,

 

At that point, I can check that is Maya in the middle of a file reading with MFileIO.isReadingFile(),

So I just wonder that I can determine if Maya is currently in the middle of updating viewport or not.

Can I do that with API or something else?

 

 

0 Likes
Accepted solutions (1)
917 Views
3 Replies
Replies (3)
Message 2 of 4

cheng_xi_li
Autodesk Support
Autodesk Support
Accepted solution

Hi,

 

I think you could try to add a flag inside the callbacks of MRenderer::addNotification. It provides beginRender event and endRender event.

 

Yours,

Li

0 Likes
Message 3 of 4

icapathos
Advocate
Advocate

How can I get the "MRenderer" with Python API 2.0?

It seems that OpenMayaRender does not have MRenderer in Python API 2.0

0 Likes
Message 4 of 4

cheng_xi_li
Autodesk Support
Autodesk Support

Hi,

 

I am afraid it these callabacks are not available in Python, please use C++ instead.

 

Yours,

Li

0 Likes