Commit: 02a7289fe3c8451af9a86e4518106e6a66f82070 Author: Hans Goudey Date: Wed Apr 7 09:12:34 2021 -0500 Branches: master https://developer.blender.org/rB02a7289fe3c8451af9a86e4518106e6a66f82070
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 =================================================================== M release/scripts/startup/bl_ui/properties_physics_common.py =================================================================== 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="") _______________________________________________ Bf-blender-cvs mailing list [email protected] https://lists.blender.org/mailman/listinfo/bf-blender-cvs
