I need to use a list in a script, and that list needs to be accessed by multiple frames during full animation renders. If you run the script and then render the animation foo behaves as expected with 100,101,102… but if you do it a second time the globally scoped foo in my_handler is not respecting the initializiation of foo = 100. And That global foo is pointing to the old value.
Anyone have an idea the best way to deal with this.
the register function installs a class for execution in the bpy.ops module and just like any other object in python you can set anything you want in there and it will stay. even in the game engine the classes/functions that are cached when running can store any variables as long as they are not rudimentary types(int,str,bytes,bytearray);