From 6838913e31701c94e727d9f777fb64649484b47f Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Thu, 3 Jan 2013 16:27:23 +0900 Subject: [PATCH] Fix view3d callback for blender 2.65a+. Yay experimental APIs :P --- tools/io_qfmap/entity.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tools/io_qfmap/entity.py b/tools/io_qfmap/entity.py index c7dea2710..90ede2879 100644 --- a/tools/io_qfmap/entity.py +++ b/tools/io_qfmap/entity.py @@ -90,11 +90,10 @@ class QFEntityRelations(bpy.types.Panel): if cls.initDone: return False if context.area.type == 'VIEW_3D': - for reg in context.area.regions: - if reg.type != 'WINDOW': - continue - reg.callback_add(draw_callback, (cls, context), 'POST_VIEW') - cls.initDone = True + sv3d = bpy.types.SpaceView3D + sv3d.draw_handler_add (draw_callback, (cls, context), 'WINDOW', + 'POST_VIEW') + cls.initDone = True return False def draw_header(self, context): pass