diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-11-26 20:35:56 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-11-26 20:46:46 +0300 |
commit | d92e9a4a25bbd0b354313d1bed45b758f3517072 (patch) | |
tree | 6572ad9c819d9a80cb43069b75d3b860771c270f /release | |
parent | 7d32d87a86e442c11e7775d7200eba2055f34f07 (diff) |
Fix broken face select in paint modes with RMB select.
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/startup/bl_operators/view3d.py | 15 |
1 files 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 |