Fix T62536: incorrect context when selecting particles
authorJacques Lucke <mail@jlucke.com>
Mon, 25 Mar 2019 14:54:00 +0000 (15:54 +0100)
committerJacques Lucke <mail@jlucke.com>
Mon, 25 Mar 2019 14:54:48 +0000 (15:54 +0100)
Reviewers: brecht

Differential Revision: https://developer.blender.org/D4566

release/scripts/startup/bl_operators/view3d.py

index 2dd4b74..50d2b49 100644 (file)
@@ -233,7 +233,10 @@ class VIEW3D_OT_select_or_deselect_all(Operator):
         else:
             select_all = bpy.ops.object.select_all
 
-        return select_all('INVOKE_DEFAULT', True, action='DESELECT')
+        if select_all.poll():
+            return select_all('INVOKE_DEFAULT', True, action='DESELECT')
+        else:
+            return retval
 
 
 classes = (