From 1e5e2412e23fd5cd3077d40a6b6bf78431516d12 Mon Sep 17 00:00:00 2001
From: Campbell Barton <ideasman42@gmail.com>
Date: Thu, 2 Sep 2010 04:53:39 +0000
Subject: [PATCH] update for rna changes

---
 io_anim_camera.py               |  2 +-
 io_export_directx_x.py          |  2 +-
 io_export_unreal_psk_psa.py     |  2 +-
 io_import_images_as_planes.py   |  2 +-
 io_import_scene_mhx.py          |  2 +-
 io_import_scene_unreal_psk.py   |  2 +-
 io_mesh_raw/export_raw.py       |  2 +-
 io_mesh_raw/import_raw.py       |  2 +-
 io_mesh_stl/__init__.py         |  4 ++--
 object_cloud_gen.py             | 12 ++++++------
 space_view3d_materials_utils.py |  4 ++--
 space_view3d_panel_measure.py   |  4 ++--
 space_view3d_spacebar_menu.py   |  4 ++--
 13 files changed, 22 insertions(+), 22 deletions(-)

diff --git a/io_anim_camera.py b/io_anim_camera.py
index b0ee4cbc6..64c79d20a 100644
--- a/io_anim_camera.py
+++ b/io_anim_camera.py
@@ -141,7 +141,7 @@ class CameraExporter(bpy.types.Operator):
         self.properties.frame_start = context.scene.frame_start
         self.properties.frame_end = context.scene.frame_end
 
-        wm = context.manager
+        wm = context.window_manager
         wm.add_fileselect(self)
         return {'RUNNING_MODAL'}
 
diff --git a/io_export_directx_x.py b/io_export_directx_x.py
index aa287e0eb..a4773dea4 100644
--- a/io_export_directx_x.py
+++ b/io_export_directx_x.py
@@ -1132,7 +1132,7 @@ class DirectXExporter(bpy.types.Operator):
         return {"FINISHED"}
 
     def invoke(self, context, event):
-        WindowManager = context.manager
+        WindowManager = context.window_manager
         WindowManager.add_fileselect(self)
         return {"RUNNING_MODAL"}
 
diff --git a/io_export_unreal_psk_psa.py b/io_export_unreal_psk_psa.py
index d39f24127..819faa80b 100644
--- a/io_export_unreal_psk_psa.py
+++ b/io_export_unreal_psk_psa.py
@@ -1501,7 +1501,7 @@ class ExportUDKAnimData(bpy.types.Operator):
         return {'FINISHED'}
         
     def invoke(self, context, event):
-        wm = context.manager
+        wm = context.window_manager
         wm.add_fileselect(self)
         return {'RUNNING_MODAL'}
 
diff --git a/io_import_images_as_planes.py b/io_import_images_as_planes.py
index 0a7b4a84a..fedd89da2 100644
--- a/io_import_images_as_planes.py
+++ b/io_import_images_as_planes.py
@@ -498,7 +498,7 @@ class ImportImagesAsPlanes(bpy.types.Operator):
         return {'FINISHED'}
 
     def invoke(self, context, event):
-        wm = bpy.context.manager
+        wm = bpy.context.window_manager
         wm.add_fileselect(self)
 
         return {'RUNNING_MODAL'}
diff --git a/io_import_scene_mhx.py b/io_import_scene_mhx.py
index 9f375a183..9230f9c72 100644
--- a/io_import_scene_mhx.py
+++ b/io_import_scene_mhx.py
@@ -2139,7 +2139,7 @@ class IMPORT_OT_makehuman_mhx(bpy.types.Operator):
         return {'FINISHED'}
 
     def invoke(self, context, event):
-        wm = context.manager
+        wm = context.window_manager
         wm.add_fileselect(self)
         return {'RUNNING_MODAL'}
 
diff --git a/io_import_scene_unreal_psk.py b/io_import_scene_unreal_psk.py
index f2844f2c9..5060156af 100644
--- a/io_import_scene_unreal_psk.py
+++ b/io_import_scene_unreal_psk.py
@@ -580,7 +580,7 @@ class IMPORT_OT_psk(bpy.types.Operator):
         return {'FINISHED'}
 
     def invoke(self, context, event):
-        wm = context.manager
+        wm = context.window_manager
         wm.add_fileselect(self)
         return {'RUNNING_MODAL'}  
 
diff --git a/io_mesh_raw/export_raw.py b/io_mesh_raw/export_raw.py
index ac5933f6f..59f06f9d8 100644
--- a/io_mesh_raw/export_raw.py
+++ b/io_mesh_raw/export_raw.py
@@ -105,7 +105,7 @@ class RawExporter(bpy.types.Operator):
         return {'FINISHED'}
 
     def invoke(self, context, event):
-        wm = context.manager
+        wm = context.window_manager
         wm.add_fileselect(self)
         return {'RUNNING_MODAL'}
 
diff --git a/io_mesh_raw/import_raw.py b/io_mesh_raw/import_raw.py
index 850f7002e..81077e34b 100644
--- a/io_mesh_raw/import_raw.py
+++ b/io_mesh_raw/import_raw.py
@@ -136,7 +136,7 @@ class RawImporter(bpy.types.Operator):
         return {'FINISHED'}
 
     def invoke(self, context, event):
-        wm = context.manager
+        wm = context.window_manager
         wm.add_fileselect(self)
         return {'RUNNING_MODAL'}
 
diff --git a/io_mesh_stl/__init__.py b/io_mesh_stl/__init__.py
index 3c2669d9c..96e8fc32c 100644
--- a/io_mesh_stl/__init__.py
+++ b/io_mesh_stl/__init__.py
@@ -91,7 +91,7 @@ class StlImporter(bpy.types.Operator):
         return {'FINISHED'}
 
     def invoke(self, context, event):
-        wm = context.manager
+        wm = context.window_manager
         wm.add_fileselect(self)
 
         return {'RUNNING_MODAL'}
@@ -133,7 +133,7 @@ class StlExporter(bpy.types.Operator):
         return {'FINISHED'}
 
     def invoke(self, context, event):
-        wm = context.manager
+        wm = context.window_manager
         wm.add_fileselect(self)
         return {'RUNNING_MODAL'}
 
diff --git a/object_cloud_gen.py b/object_cloud_gen.py
index d52037058..d2336c633 100644
--- a/object_cloud_gen.py
+++ b/object_cloud_gen.py
@@ -330,7 +330,7 @@ class GenerateCloud(bpy.types.Operator):
 
     def execute(self, context):
         # Make variable that is the current .blend file main data blocks
-        main = context.main
+        blend_data = context.blend_data
 
         # Make variable that is the active object selected by user
         active_object = context.active_object
@@ -373,7 +373,7 @@ class GenerateCloud(bpy.types.Operator):
            for createdObj in createdObjects:
                totallyDeleteObject(scene, createdObj)
 
-           # Delete the main object
+           # Delete the blend_data object
            totallyDeleteObject(scene, mainObj)
 
            # Select all of the left over boxes so people can immediately
@@ -404,7 +404,7 @@ class GenerateCloud(bpy.types.Operator):
             bounds.hide_render = False
 
             # Just add a Definition Property designating this
-            # as the main object.
+            # as the blend_data object.
             bounds["CloudMember"] = "MainObj"
 
             # Since we used iteration 0 to copy with object we
@@ -492,7 +492,7 @@ class GenerateCloud(bpy.types.Operator):
                 bpy.ops.object.material_slot_remove()
 
             # Add a new material.
-            cloudMaterial = main.materials.new("CloudMaterial")
+            cloudMaterial = blend_data.materials.new("CloudMaterial")
             bpy.ops.object.material_slot_add()
             bounds.material_slots[0].material = cloudMaterial
 
@@ -510,7 +510,7 @@ class GenerateCloud(bpy.types.Operator):
 
             # Add a texture
             vMaterialTextureSlots = cloudMaterial.texture_slots
-            cloudtex = main.textures.new("CloudTex", type='CLOUDS')
+            cloudtex = blend_data.textures.new("CloudTex", type='CLOUDS')
             cloudtex.noise_type = 'HARD_NOISE'
             cloudtex.noise_scale = 2
             cloudMaterial.add_texture(cloudtex, 'ORCO')
@@ -530,7 +530,7 @@ class GenerateCloud(bpy.types.Operator):
             #bpy.ops.ptcache.bake(bake=False)
 
             # Add a Point Density texture
-            pDensity = main.textures.new("CloudPointDensity", 'POINT_DENSITY')
+            pDensity = blend_data.textures.new("CloudPointDensity", 'POINT_DENSITY')
             cloudMaterial.add_texture(pDensity, 'ORCO')
             vMaterialTextureSlots[1].use_map_density = True
             vMaterialTextureSlots[1].use_rgb_to_intensity = True
diff --git a/space_view3d_materials_utils.py b/space_view3d_materials_utils.py
index ba5b68189..c013e4c64 100644
--- a/space_view3d_materials_utils.py
+++ b/space_view3d_materials_utils.py
@@ -670,12 +670,12 @@ class VIEW3D_MT_select_material(bpy.types.Menu):
 
 
 def register():
-    km = bpy.context.manager.keyconfigs.active.keymaps['3D View']
+    km = bpy.context.window_manager.keyconfigs.active.keymaps['3D View']
     kmi = km.items.new('wm.call_menu', 'Q', 'PRESS')
     kmi.properties.name = "VIEW3D_MT_master_material"
 
 def unregister():
-    km = bpy.context.manager.keyconfigs.active.keymaps['3D View']
+    km = bpy.context.window_manager.keyconfigs.active.keymaps['3D View']
     for kmi in km.items:
         if kmi.idname == 'wm.call_menu':
             if kmi.properties.name ==  "VIEW3D_MT_master_material":
diff --git a/space_view3d_panel_measure.py b/space_view3d_panel_measure.py
index 9451bbf51..030033d86 100644
--- a/space_view3d_panel_measure.py
+++ b/space_view3d_panel_measure.py
@@ -606,12 +606,12 @@ class VIEW3D_OT_display_measurements(bpy.types.Operator):
 
     def execute(self, context):
         if context.area.type == 'VIEW_3D':
-            mgr_ops = context.manager.operators.values()
+            mgr_ops = context.window_manager.operators.values()
             if not self.bl_idname in [op.bl_idname for op in mgr_ops]:
                 # Add the region OpenGL drawing callback
                 for WINregion in context.area.regions:
                     if WINregion.type == 'WINDOW':
-                        context.manager.add_modal_handler(self)
+                        context.window_manager.add_modal_handler(self)
                         self._handle = WINregion.callback_add(
                             draw_measurements_callback,
                             (self, context),
diff --git a/space_view3d_spacebar_menu.py b/space_view3d_spacebar_menu.py
index f41e51d8a..08ca11986 100644
--- a/space_view3d_spacebar_menu.py
+++ b/space_view3d_spacebar_menu.py
@@ -1454,13 +1454,13 @@ class VIEW3D_MT_undoS(bpy.types.Menu):
         layout.operator("ed.redo", icon='TRIA_RIGHT')
 
 def register():
-    km = bpy.context.manager.keyconfigs.active.keymaps['3D View']
+    km = bpy.context.window_manager.keyconfigs.active.keymaps['3D View']
     kmi = km.items.new('wm.call_menu', 'SPACE', 'PRESS')
     kmi.properties.name = "VIEW3D_MT_Space_Dynamic_Menu"
 
 
 def unregister():
-    km = bpy.context.manager.keyconfigs.active.keymaps['3D View']
+    km = bpy.context.window_manager.keyconfigs.active.keymaps['3D View']
     for kmi in km.items:
         if kmi.idname == 'wm.call_menu':
             if kmi.properties.name == "VIEW3D_MT_Space_Dynamic_Menu":
-- 
GitLab