From d92e9a4a25bbd0b354313d1bed45b758f3517072 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Mon, 26 Nov 2018 18:35:56 +0100 Subject: [PATCH] Fix broken face select in paint modes with RMB select. --- release/scripts/startup/bl_operators/view3d.py | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/release/scripts/startup/bl_operators/view3d.py b/release/scripts/startup/bl_operators/view3d.py index 1ebb3c88b05..b0c0c2a9299 100644 --- a/release/scripts/startup/bl_operators/view3d.py +++ b/release/scripts/startup/bl_operators/view3d.py @@ -184,13 +184,6 @@ class VIEW3D_OT_select_or_deselect_all(Operator): options={'SKIP_SAVE'}, ) - @classmethod - def poll(cls, context): - active_object = context.active_object - if active_object: - return active_object.mode in {'EDIT', 'OBJECT', 'POSE'} - return True - def invoke(self, context, event): retval = bpy.ops.view3d.select( 'INVOKE_DEFAULT', @@ -210,9 +203,10 @@ class VIEW3D_OT_select_or_deselect_all(Operator): return retval active_object = context.active_object - if active_object: - if active_object.mode == 'EDIT': + if active_object.mode == 'OBJECT': + select_all = bpy.ops.object.select_all + elif active_object.mode == 'EDIT': if active_object.type == 'MESH': select_all = bpy.ops.mesh.select_all elif active_object.type == 'CURVE': @@ -230,7 +224,8 @@ class VIEW3D_OT_select_or_deselect_all(Operator): elif active_object.mode == 'PARTICLE_EDIT': select_all = bpy.ops.particle.select_all else: - select_all = bpy.ops.object.select_all + # Don nothing in paint and sculpt modes. + return retval else: select_all = bpy.ops.object.select_all