From 02a7289fe3c8451af9a86e4518106e6a66f82070 Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Wed, 7 Apr 2021 09:12:34 -0500 Subject: Fix T87264: Button to remove physics modifier doesn't work This is caused by rB9f323e9bf79f. When hover shortcuts are used, we cannot use the modifier from the context (which will be the active modifier), or they won't be hover shortcuts anymore! There didn't use to be an editor-level "modifier" context variable, which is why this worked before. The fix is simple, just specify the modifier name for this particular remove button. Differential Revision: https://developer.blender.org/D10870 --- release/scripts/startup/bl_ui/properties_physics_common.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'release') diff --git a/release/scripts/startup/bl_ui/properties_physics_common.py b/release/scripts/startup/bl_ui/properties_physics_common.py index 4ddb4953fbd..7f55e4888cf 100644 --- a/release/scripts/startup/bl_ui/properties_physics_common.py +++ b/release/scripts/startup/bl_ui/properties_physics_common.py @@ -38,13 +38,12 @@ class PhysicButtonsPanel: def physics_add(layout, md, name, type, typeicon, toggles): row = layout.row(align=True) if md: - row.context_pointer_set("modifier", md) row.operator( "object.modifier_remove", text=name, text_ctxt=i18n_contexts.default, icon='X', - ) + ).modifier = md.name if toggles: row.prop(md, "show_viewport", text="") row.prop(md, "show_render", text="") -- cgit v1.2.3