Docs
Download

Blender events

Run nodes when Blender opens or saves a file, renders, changes a frame, changes a property or quits.

An event node starts a flow when something happens in Blender: after a file is opened, before it's saved, when the frame changes. Add one from Add › Events and connect what should happen to its output. It runs as long as your add-on is enabled, in every file.

On Load set to After, On Blender Change watching the active object, and On Blender Close, each running a Print node

Blender events

Most event nodes have a choice on the node for when exactly they run, e.g. Before or After saving (buttons, or a dropdown when there are more than three).

NodeChoicesRuns
On LoadBefore, After, FailedBefore or after a .blend file is opened, or when opening it failed. Use After to set things up in the opened file
On SaveBefore, After, FailedBefore or after the file is saved, or when saving failed
On UndoBefore, AfterBefore or after an undo step
On RedoBefore, AfterBefore or after a redo step
On Frame ChangeBefore, AfterBefore or after the current frame changes: playback, scrubbing the timeline, setting the frame from Python
On PlaybackStart, StopWhen animation playback starts or stops
On Depsgraph UpdateBefore, AfterBefore or after Blender updates the scene's data after a change: moving an object, editing a mesh, changing a setting. It runs very often, so keep it fast
On Render StartEach Frame, OnceBefore each frame renders, or once when a render or animation render starts
On Render FinishEach Frame, Complete, Cancel, Frame SavedAfter each frame rendered, when the whole render is done or cancelled, or after an animation frame was written to disk
On BakeStart, Complete, CancelWhen baking (Cycles' Bake button) starts, finishes or is cancelled
On CompositeBefore, After, CancelBefore or after the compositor runs, or when it's cancelled
On Append or LinkBefore, AfterBefore or after data is appended or linked from another .blend file

These run outside of any operator or panel. Report prints its message instead of showing it, and the context is whatever Blender has at that moment: during a render or file load there may be no active object or editor.

On Blender Close

On Blender Close runs once when Blender quits. Use it to save something to a file, e.g. settings or a log. Blender's data may already be partly gone at this point, so don't rely on the scene or objects.

On Blender Change

On Blender Change runs when one of Blender's properties changes: the active object, an object's name or location, the render engine, the current mode. Search or paste the property's path in the field on the node, like on a Blender Data node. The path starts at the Context or the Blend File, and it has to end at a property, not at data or an item of a list.

  • It watches that property on all data of the same type. A path to the active object's location runs when any object's location changes. The node shows what it watches below the path, e.g. Any Layer Objects › active for view_layer.objects.active.
  • Changes in the interface (fields, menus, the Outliner) and from Python run it. Moving objects in the 3D Viewport (G, R, S) and changes by animation don't: use On Depsgraph Update or On Frame Change for those.
  • It runs once Blender is done with the current operator, and only once even if the property changed several times.
  • Items added to or removed from a list (a new object in the scene) aren't reported. Watch something that changes with it, or use On Depsgraph Update.
  • It keeps working after another file is opened.

For your own add-on's properties use On Property Update, which runs right away.