This patch adds callbacks for use in C and Python
- callbacks which can be added in C (not related to python), each callback receives optional context, main, id and its own argument.
- python adds its own callback which scripters can access, this is a simple callback
def MyFunc(context, data): print("Callback:", data)
bpy.app.callbacks.load_post += [MyFunc]
The callbacks are cleared on loading new files as with drivers.
To keep the patch simple to review I've only added render and load callbacks.
Description
Description
Event Timeline
Comment Actions
note,
#include "../../blenlib/intern/BLI_callbacks.h"
Ill move this file, just didnt for the purpose of having the patch easier to read.
Comment Actions
should have mentioned the python callbacks get a context and ID Data or None. On render passes a scene for instance.