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:
authorDalai Felinto <dfelinto@gmail.com>2018-09-06 17:04:57 +0300
committerDalai Felinto <dfelinto@gmail.com>2018-09-06 17:13:07 +0300
commit964a38d0d14ee4e383492b0c635e22f0ff0242e8 (patch)
tree51a3122ceece84840dd005dc3c64e2fb3b745cfa /io_mesh_uv_layout
parentb7630913cde7272cebd3de19f928ef29313c10d1 (diff)
UV_OT_export_layout: Workaround to make the addon register
__name__ is never "__main__" here, but instead it is the module name (io_mesh_uv_layout).
Diffstat (limited to 'io_mesh_uv_layout')
-rw-r--r--io_mesh_uv_layout/__init__.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/io_mesh_uv_layout/__init__.py b/io_mesh_uv_layout/__init__.py
index e7da8c7b..7256bbef 100644
--- a/io_mesh_uv_layout/__init__.py
+++ b/io_mesh_uv_layout/__init__.py
@@ -301,14 +301,14 @@ def menu_func(self, context):
def register():
- bpy.utils.register_module(__name__)
+ bpy.utils.register_class(ExportUVLayout)
bpy.types.IMAGE_MT_uvs.append(menu_func)
def unregister():
- bpy.utils.unregister_module(__name__)
+ bpy.utils.unregister_class(ExportUVLayout)
bpy.types.IMAGE_MT_uvs.remove(menu_func)
-if __name__ == "__main__":
+if __name__ == 'io_mesh_uv_layout':
register()