From b95b5ed77a9c1565ab9aef60f51c8f5b16f630e8 Mon Sep 17 00:00:00 2001
From: Dima Glib <dima.glib@gmail.com>
Date: Mon, 11 Mar 2013 18:15:59 +0000
Subject: [PATCH] Restored SCULPT & PAINT mode check.

---
 space_view3d_enhanced_3d_cursor.py | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/space_view3d_enhanced_3d_cursor.py b/space_view3d_enhanced_3d_cursor.py
index 08c65d80..0f1ea56a 100644
--- a/space_view3d_enhanced_3d_cursor.py
+++ b/space_view3d_enhanced_3d_cursor.py
@@ -249,9 +249,8 @@ class EnhancedSetCursor(bpy.types.Operator):
             bpy.ops.view3d.cursor3d_monitor()
         
         # Don't interfere with these modes when only mouse is pressed
-        if ('PAINT' or 'SCULPT') in context.mode:
-            if "MOUSE" in event.type:
-                return {'CANCELLED'}
+        if ('SCULPT' in context.mode) or ('PAINT' in context.mode):
+            if "MOUSE" in event.type:                return {'CANCELLED'}
         
         CursorDynamicSettings.active_transform_operator = self
         
-- 
GitLab