From 86643a4e73fc23055cf346213b0569200bee795d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Fri, 8 Oct 2021 14:06:20 +0200 Subject: [PATCH] Py doc: document msgbus subscriptions clearing on blendfile load Document that `bpy.msgbus.subscribe_rna()`-registered messagebus subscriptions will be cleared whenever a new blend file is loaded. Passing `options={'PERSISTENT'}` has no influence on this behaviour. --- source/blender/python/intern/bpy_msgbus.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/blender/python/intern/bpy_msgbus.c b/source/blender/python/intern/bpy_msgbus.c index 75a5f6f72ae..bf70f8158d2 100644 --- a/source/blender/python/intern/bpy_msgbus.c +++ b/source/blender/python/intern/bpy_msgbus.c @@ -208,6 +208,9 @@ static void bpy_msgbus_subscribe_value_free_data(struct wmMsgSubscribeKey *UNUSE PyDoc_STRVAR( bpy_msgbus_subscribe_rna_doc, ".. function:: subscribe_rna(key, owner, args, notify, options=set())\n" + "\n" + " Register a message bus subscription. It will be cleared when another blend file is\n" + " loaded, or can be cleared explicitly via :func:`bpy.msgbus.clear_by_owner`.\n" "\n" BPY_MSGBUS_RNA_MSGKEY_DOC " :arg owner: Handle for this subscription (compared by identity).\n" " :type owner: Any type.\n"