Fix T41499: Can't use Deselect/Select All tool while in Texture Paint mode

This commit is contained in:
Sergey Sharybin 2014-08-20 14:00:57 +06:00
parent dcf9bc82d8
commit f11057f54a
Notes: blender-bot 2023-02-14 10:11:49 +01:00
Referenced by issue #41567, Metaball rendering stuck on 1 sample
Referenced by issue #41499, Can't use Deselect/Select All tool while in Texture Paint mode.
1 changed files with 7 additions and 0 deletions

View File

@ -169,6 +169,13 @@ class VIEW3D_OT_select_or_deselect_all(Operator):
default=False,
)
@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):
x = event.mouse_region_x
y = event.mouse_region_y