From 8a799b00f8fa28433ba44cfec09757f77a46ae0d Mon Sep 17 00:00:00 2001 From: Luca Rood Date: Thu, 18 Aug 2022 14:42:48 +0200 Subject: Fix T100423: Addon's custom context menu entries get overridden by other addons This introduces a new `UI_MT_button_context_menu` class which is registered at startup. Addons can append/prepend draw functions to this class, in order to add their custom context menu entries. The new class replaces the old `WM_MT_button_context` class, thus requiring a small change in addons using this feature. This is done because addons were previously required to register the class themselves, which caused addons to override each other's context menu entries. Now the class registration is handled by Blender, and addons need only append their draw functions. The new class name ensures that addons using the old method don't override menu entries made using the new class. Menu entries added with the legacy `WM_MT_button_context` class are still drawn for backwards compatibility, but this class must not be used going forward, as any addon using it still runs the risk of having its menu entries overridden, and support for the legacy class is subject to removal in a future version. Reviewed By: campbellbarton Maniphest Tasks: T100423 Differential Revision: https://developer.blender.org/D15702 --- source/tools | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/tools') diff --git a/source/tools b/source/tools index da8bdd7244c..548055f4021 160000 --- a/source/tools +++ b/source/tools @@ -1 +1 @@ -Subproject commit da8bdd7244c7b6c2eadf4c949ff391d0cc430275 +Subproject commit 548055f40213c775a6b77025525c91e8466e70d6 -- cgit v1.2.3