Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk® Maya® / Python / atexit.register() functions not being called from Maya on exit?
  RSS 2.0 ATOM  

atexit.register() functions not being called from Maya on exit?
Rate this thread
 
64205
 
Permlink of this thread  
avatar
  • Total Posts: 9
  • Joined: 02 September 2006 08:06 PM

Does the atexit package work from within Maya?

I’ve tried the straightforward approach:

import sendit

import atexit
atexit
.register(sendit.sendit)

where the sendit.sendit() function just sends me an e-mail.

I don’t get an e-mail from either Maya2011 or 2012.

There’s a finalize() function registered with atexit in Autodesk\Maya20nn\Python\lib\site-packages\maya\app\startup\basic.py, so you’d think it would work.  However the finalize() method doesn’t actually do anything, so no one probably noticed it not working.

I’ve also tried putting my sendit() call in the Maya finalize() method and still no results.

Is this just broken or is there some trick to getting it to work?

Thanks!

--- David



Replies: 0