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:
authorHans Goudey <h.goudey@me.com>2021-04-07 17:12:34 +0300
committerHans Goudey <h.goudey@me.com>2021-04-07 17:12:34 +0300
commit02a7289fe3c8451af9a86e4518106e6a66f82070 (patch)
treeef1b1e64cf1b1cfdf5bd26f8be35efc2d302dfd4 /release
parent15670ebb9549db77414e266324d33114fa3af468 (diff)
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
Diffstat (limited to 'release')
-rw-r--r--release/scripts/startup/bl_ui/properties_physics_common.py3
1 files changed, 1 insertions, 2 deletions
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="")