[Bf-blender-cvs] [29e55043312] blender-v2.93-release: Fix T87926: Transform menu has operators guaranteed to not pass poll in certain modes

Philipp Oeser noreply at git.blender.org
Mon May 3 16:56:47 CEST 2021


Commit: 29e55043312d29bdf6736396e5ee1d0a13b91812
Author: Philipp Oeser
Date:   Fri Apr 30 13:13:03 2021 +0200
Branches: blender-v2.93-release
https://developer.blender.org/rB29e55043312d29bdf6736396e5ee1d0a13b91812

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

===================================================================

M	release/scripts/startup/bl_ui/space_view3d.py

===================================================================

diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index 08f4ed9dd6c..d86e65d9f0d 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -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



More information about the Bf-blender-cvs mailing list