[Bf-extensions-cvs] [d9b4c8f] master: space_view3d_cursor_control: removed unnecessary string comparisons
Sybren A. Stüvel
noreply at git.blender.org
Fri Mar 13 11:15:52 CET 2015
Commit: d9b4c8f5ddc958a66cd53f630d5569da426efb4f
Author: Sybren A. Stüvel
Date: Fri Mar 13 11:15:22 2015 +0100
Branches: master
https://developer.blender.org/rBACd9b4c8f5ddc958a66cd53f630d5569da426efb4f
space_view3d_cursor_control: removed unnecessary string comparisons
===================================================================
M space_view3d_cursor_control/cursor_utils.py
===================================================================
diff --git a/space_view3d_cursor_control/cursor_utils.py b/space_view3d_cursor_control/cursor_utils.py
index b2f4ca0..2fad7ee 100644
--- a/space_view3d_cursor_control/cursor_utils.py
+++ b/space_view3d_cursor_control/cursor_utils.py
@@ -34,17 +34,18 @@ class CursorAccess:
@classmethod
def findSpace(cls):
- area = None
for area in bpy.data.window_managers[0].windows[0].screen.areas:
if area.type == 'VIEW_3D':
break
- if area.type != 'VIEW_3D':
+ else:
return None
+
for space in area.spaces:
if space.type == 'VIEW_3D':
break
- if space.type != 'VIEW_3D':
+ else:
return None
+
return space
@classmethod
More information about the Bf-extensions-cvs
mailing list