Created
January 6, 2019 21:40
-
-
Save zeffii/5ab3c3ceb513b147c106846cd92a49fe to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import bpy | |
from bpy.app.handlers import persistent | |
@persistent | |
def handler_undo_pre(scene): | |
print('pre') | |
@persistent | |
def handler_undo_post(scene): | |
print('post') | |
if __name__ == '__main__': | |
bpy.app.handlers.undo_pre.append(handler_undo_pre) | |
bpy.app.handlers.undo_post.append(handler_undo_post) | |
# bpy.app.handlers.undo_pre.remove(handler_undo_pre) | |
# bpy.app.handlers.undo_post.remove(handler_undo_post) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment