Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca Rood <dev@lucarood.com>2022-08-18 15:42:48 +0300
committerLuca Rood <dev@lucarood.com>2022-08-18 15:46:30 +0300
commit8a799b00f8fa28433ba44cfec09757f77a46ae0d (patch)
tree84bb804b342fb6c4344d0f2729322eafc7c5752c /release/scripts/addons
parentc3757504233ab7b1dca7102bb9239423d6419efc (diff)
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
Diffstat (limited to 'release/scripts/addons')
m---------release/scripts/addons0
1 files changed, 0 insertions, 0 deletions
diff --git a/release/scripts/addons b/release/scripts/addons
-Subproject 7a8502871c34db0343cc7de52d6b49b15a84238
+Subproject 32baafe44dc56edd1baf6e5a16b4439ded8238f