0
$\begingroup$

Is there any way to call a function on object delete or on changing count of bpy.data.objects? There is nothing suitable in bpy.app.handlers and I coudn't find something anywhere else.

$\endgroup$
  • 1
    $\begingroup$ could set up a scene_update handler to do this with a global dic or similar and check with something like this blender.stackexchange.com/questions/34860/… $\endgroup$ – batFINGER Oct 28 '16 at 9:56
  • $\begingroup$ Thanks. I Tried to avoid scene_update handler because it calls too often but it's ok if this is an only option... $\endgroup$ – Anton Oct 28 '16 at 10:02
  • $\begingroup$ Could use a modal timer operator, or even a draw method to flag change. The scene_update handler is AFAIK the "catch all" way to check on delete. $\endgroup$ – batFINGER Oct 28 '16 at 10:26
  • $\begingroup$ You can override the delete function. blender.stackexchange.com/questions/28932/… $\endgroup$ – Piotr Kowalczyk Mar 22 at 14:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.