fix for changes in the api
authorCampbell Barton <ideasman42@gmail.com>
Mon, 13 Sep 2010 07:41:08 +0000 (07:41 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 13 Sep 2010 07:41:08 +0000 (07:41 +0000)
io_export_md3.py
space_view3d_game_props_visualiser.py

index 8a418205f893467c9a822084cc5669cc71d9ba43..5e11d02fa959c49cd8d714565a0705377dac62fd 100644 (file)
@@ -683,7 +683,7 @@ class ExportMD3(bpy.types.Operator):
    return {'FINISHED'}
 
   def invoke(self, context, event):
-    wm = context.manager
+    wm = context.window_manager
     wm.add_fileselect(self)
     return {'RUNNING_MODAL'}
 
index 3814270250a4239d5d2d047e2eaaa29faad868ef..a2199f52068ecb71330df899cfea02719db70f79 100644 (file)
@@ -163,7 +163,7 @@ class GamePropertyVisualiser(bpy.types.Operator):
                 print('init')
                 # operator is called for the first time, start everything
                 context.scene.display_game_properties = 1
-                context.manager.add_modal_handler(self)
+                context.window_manager.add_modal_handler(self)
                 self.handle1 = context.region.callback_add(calc_callback,
                     (self, context), 'POST_VIEW')
                 self.handle2 = context.region.callback_add(draw_callback,
@@ -182,19 +182,17 @@ class GamePropertyVisualiser(bpy.types.Operator):
 
 # defining the panel
 def menu_func(self, context):
-    
-    sce=context.scene
-    sce.IntProperty(name = 'visualise game properties' ,attr="display_game_properties", default=0)
-
     col = self.layout.column(align=True)
     col.operator(GamePropertyVisualiser.bl_idname, text="Visualise game props")
     self.layout.separator()
 
 
 def register():
+    bpy.types.Scene.display_game_properties = bpy.props.IntProperty(name='Visualise Game Poperties')
     bpy.types.VIEW3D_PT_view3d_display.prepend(menu_func)
 
 def unregister():
+    del bpy.types.Scene.display_game_properties
     bpy.types.VIEW3D_PT_view3d_display.remove(menu_func)
 
 if __name__ == "__main__":