Fix T87926: Transform menu has operators guaranteed to not pass poll in certain modes
Reported for ops.transform.vertex_warp and ops.transform.vertex_random. Polling will check with ED_transverts_check_obedit, if we know it will fail e.g. for pose mode, we can do the same check in the UI already. Maniphest Tasks: T87926 Differential Revision: https://developer.blender.org/D11128
This commit is contained in:
parent
04905c5652
commit
29e5504331
@ -938,7 +938,8 @@ class VIEW3D_MT_transform_base:
|
||||
layout.operator("transform.bend", text="Bend")
|
||||
layout.operator("transform.push_pull", text="Push/Pull")
|
||||
|
||||
if context.mode != 'OBJECT':
|
||||
if context.mode in {'EDIT_MESH', 'EDIT_ARMATURE', 'EDIT_SURFACE', 'EDIT_CURVE',
|
||||
'EDIT_LATTICE', 'EDIT_METABALL'}:
|
||||
layout.operator("transform.vertex_warp", text="Warp")
|
||||
layout.operator_context = 'EXEC_REGION_WIN'
|
||||
layout.operator("transform.vertex_random", text="Randomize").offset = 0.1
|
||||
|
Loading…
Reference in New Issue
Block a user