If you want to do big calculations in Blender and still have a responsive interface, you can check the model statements with python timers.
It will be something like this:
class YourOperator(bpy.types.Operator): bl_idname = "youroperatorname" bl_label = "Your Operator" _updating = False _calcs_done = False _timer = None def do_calcs(self):
You need to take care of the proper import of modules and registration of operators yourself.
I have an implementation of the modal operator Conway Game Of Life to show how this can be used: https://www.dropbox.com/s/b73idbwv7mw6vgc/gol.blend?dl=0
jesterKing
source share