Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2017-03-19 18:40:31 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2017-03-19 18:40:31 +0300
commit1acd28885f77a3c655b20dd1d9837f24336a9940 (patch)
treec07ba36f2c188916e2b6dd5a1fffc1da09189350 /io_import_images_as_planes.py
parenta68a08a65e8dc974f40f8f427545615c926f49b7 (diff)
ImportImageAsPlane: remove usage of register_module.
Diffstat (limited to 'io_import_images_as_planes.py')
-rw-r--r--io_import_images_as_planes.py15
1 files changed, 12 insertions, 3 deletions
diff --git a/io_import_images_as_planes.py b/io_import_images_as_planes.py
index 42b8c089..b5099da0 100644
--- a/io_import_images_as_planes.py
+++ b/io_import_images_as_planes.py
@@ -21,7 +21,7 @@
bl_info = {
"name": "Import Images as Planes",
"author": "Florian Meyer (tstscr), mont29, matali, Ted Schundler (SpkyElctrc)",
- "version": (3, 1, 0),
+ "version": (3, 1, 1),
"blender": (2, 78, 0),
"location": "File > Import > Images as Planes or Add > Mesh > Images as Planes",
"description": "Imports images and creates planes with the appropriate aspect ratio. "
@@ -1204,10 +1204,18 @@ def import_images_button(self, context):
self.layout.operator(IMPORT_IMAGE_OT_to_plane.bl_idname, text="Images as Planes", icon='TEXTURE')
+classes = (
+ IMPORT_IMAGE_OT_to_plane,
+)
+
+
def register():
- bpy.utils.register_module(__name__)
+ for cls in classes:
+ bpy.utils.register_class(cls)
+
bpy.types.INFO_MT_file_import.append(import_images_button)
bpy.types.INFO_MT_mesh_add.append(import_images_button)
+
bpy.app.handlers.load_post.append(register_driver)
register_driver()
@@ -1223,7 +1231,8 @@ def unregister():
bpy.app.handlers.load_post.remove(register_driver)
del bpy.app.driver_namespace['import_image__find_plane_corner']
- bpy.utils.unregister_module(__name__)
+ for cls in classes:
+ bpy.utils.unregister_class(cls)
if __name__ == "__main__":