1

I am animating a scene with the help of bpy.app.handlers.frame_change_pre hook.

I'd like to be able to store the "initial state" (vertex position in this case) in some Python objects so that I can reset the animation after the changes made by the handler and even if I overwrite my .blend file with my "changed" scene. As a matter of fact, the next time I load my file, the initial state will be the "changed" one.

So, my question is, more or less, can I save Python objects in my .blend file?

cjorssen
  • 630
  • 9
  • 22

1 Answers1

2

A possibility is to use some hidden mesh (or other native Blender object type) to store the wanted data.

Also, as indicated by @batFinger in comments, you can use text blocks as a more versatile solution, if needed.

lemon
  • 60,295
  • 3
  • 66
  • 136