[Bf-python] __del__ hook

Martin Poirier theeth at yahoo.com
Fri Aug 28 20:16:39 CEST 2009



--- On Fri, 8/28/09, Rettig, Frank AGTHZA-DAE <rettifan at schaeffler.com> wrote:

> I 'am working on a way to export 3D
> data to Blender. My application generates a python script
> that builds up the scene in Blender. The problem is that I
> can't force my application to write the last line of code.
> This last line would be something like "myModel.setup()".
> Since I couldn't generate the last setup call, the idea was
> to let python do the job by using the __del__ hook. I see
> that a expicit call to a setup method would be the best
> solution, but since this isn't possible the only thing that
> came to my mind was the __del__ hook.

I don't get it. Your program must have a definite entry and exit point, just add your setup call before that last one.

> I can't force my application to write the last line of code.

This I particularly don't understand. Are you saying the program doesn't execute entirely?

If you can send an example (or an outline) of what your code does, we might be able to help a bit better.

Martin


      __________________________________________________________________
Looking for the perfect gift? Give the gift of Flickr! 

http://www.flickr.com/gift/



More information about the Bf-python mailing list