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).
This commit is contained in:
Dalai Felinto 2018-09-06 11:04:57 -03:00
parent b7630913cd
commit 964a38d0d1
1 changed files with 3 additions and 3 deletions

View File

@ -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()