First attempt at a pull request, think it worked :)
Notes:
Update: In transferring the code to github I discovered I missed putting bpy.utils.register_class(InitializeHandler) in register() and bpy.utils.unregister_class(InitializeHandler in unregister(). I did 2 commits to fix this and it looks like they're in this pull request but I'm not sure.
Mesh update lagging key frames when using keyboard frame navigation:
Fixed by changing all instances of bpy.app.handlers.frame_change_pre
to bpy.app.handlers.frame_change_post
Automatically initialize the frame handler when loading Keymesh scenes
Added persistent function km_frame_handler. Appended it to bpy.app.handlers.load_post, in the register() function. Won't load the frame handler if it's not a Keymesh scene
Added a class/function, InitializeHandler/initialize_handler, with corresponding panel button that (re)initializes the frame handler. Not really necessary after adding automatic initialization, but retained in case some other script or addon causes the handler to stop working
If you create a Keymesh keyframe and immediately undo Blender crashes:
Fixed by adding bl_options = {'REGISTER', 'UNDO'} to KeyframeMesh
Panel bl_idname not using Blender's new PT syntax: Shows an error in the system console; but doesn't really cause any problems, though it may in the future.
Changed bl_idname = "panel.keymesh_panel" to bl_idname = "VIEW3D_PT_keymesh_panel"
First attempt at a pull request, think it worked :)
Notes:
Update: In transferring the code to github I discovered I missed putting bpy.utils.register_class(InitializeHandler) in register() and bpy.utils.unregister_class(InitializeHandler in unregister(). I did 2 commits to fix this and it looks like they're in this pull request but I'm not sure.
Mesh update lagging key frames when using keyboard frame navigation: Fixed by changing all instances of bpy.app.handlers.frame_change_pre to bpy.app.handlers.frame_change_post
Automatically initialize the frame handler when loading Keymesh scenes Added persistent function km_frame_handler. Appended it to bpy.app.handlers.load_post, in the register() function. Won't load the frame handler if it's not a Keymesh scene
Added a class/function, InitializeHandler/initialize_handler, with corresponding panel button that (re)initializes the frame handler. Not really necessary after adding automatic initialization, but retained in case some other script or addon causes the handler to stop working
If you create a Keymesh keyframe and immediately undo Blender crashes: Fixed by adding bl_options = {'REGISTER', 'UNDO'} to KeyframeMesh
Panel bl_idname not using Blender's new PT syntax: Shows an error in the system console; but doesn't really cause any problems, though it may in the future. Changed bl_idname = "panel.keymesh_panel" to bl_idname = "VIEW3D_PT_keymesh_panel"