forked from bartvdbraak/blender
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
This commit is contained in:
parent
15670ebb95
commit
02a7289fe3
@ -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="")
|
||||
|
Loading…
Reference in New Issue
Block a user