ability to have permanent callbacks that stay active when new blend files are loaded.
authorCampbell Barton <ideasman42@gmail.com>
Thu, 3 Nov 2011 06:53:52 +0000 (06:53 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 3 Nov 2011 06:53:52 +0000 (06:53 +0000)
commite2393d11090765caf987e5ef8e2e688d80c0e64d
tree2aa909746eb9c11fb47c60740f80fb197384565b
parent7d7977658ad12a940597da5b78ce70e4e5081f4b
ability to have permanent callbacks that stay active when new blend files are loaded.

this works by tagging functions, eg:

  def my_func(scene):
      pass

  bpy.app.handlers.permanent_tag(my_func, True)  # <-- important bit
  bpy.app.handlers.frame_change_pre.append(my_func)
source/blender/python/BPY_extern.h
source/blender/python/intern/bpy_app_handlers.c
source/blender/render/intern/source/convertblender.c
source/blender/windowmanager/intern/wm_files.c
source/blender/windowmanager/intern/wm_init_exit.c
source/creator/creator.c