From 00b84551cf7798c402508bce9458a2ed2ca1fc77 Mon Sep 17 00:00:00 2001 From: Stephen Leger Date: Thu, 3 Aug 2017 15:59:40 +0200 Subject: archipack: thumb generator to replace static thumbs, revert _preset to preset according to talk with ideasman42 --- archipack/archipack_manipulator.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'archipack/archipack_manipulator.py') diff --git a/archipack/archipack_manipulator.py b/archipack/archipack_manipulator.py index c96af62a..034507d8 100644 --- a/archipack/archipack_manipulator.py +++ b/archipack/archipack_manipulator.py @@ -2094,7 +2094,7 @@ class ARCHIPACK_OT_manipulate(Operator): return res def invoke(self, context, event): - if context.space_data.type == 'VIEW_3D': + if context.space_data is not None and context.space_data.type == 'VIEW_3D': context.window_manager.modal_handler_add(self) return {'RUNNING_MODAL'} else: @@ -2213,7 +2213,7 @@ class Manipulable(): # take care of context switching # when call from outside of 3d view - if context.space_data.type != 'VIEW_3D': + if context.space_data is not None and context.space_data.type != 'VIEW_3D': for window in bpy.context.window_manager.windows: screen = window.screen for area in screen.areas: -- cgit v1.2.3