s-leger / blender_cad_transforms

Precise CAD like transfoms for blender
GNU General Public License v3.0
75 stars 4 forks source link

Addon is missing "unregister" method #94

Closed bkmeneguello closed 1 year ago

bkmeneguello commented 1 year ago

When running a script (bpy.ops.export_scene.gltf) I got this error:

Exception in module unregister(): 'C:\\Users\\nobody\\AppData\\Roaming\\Blender Foundation\\Blender\\3.4\\scripts\\addons\\slcad_transform\\__init__.py'
Traceback (most recent call last):
  File "C:\Users\nobody\scoop\apps\blender\current\3.4\scripts\modules\addon_utils.py", line 421, in disable
    mod.unregister()
AttributeError: module 'slcad_transform' has no attribute 'unregister'

Blender docs say the unregister module method is required.

s-leger commented 1 year ago

The unregister method is properly implemented.

def unregister():
    for tool in (SLCAD_transform, SLCAD_transform_edit_mesh, SLCAD_transform_edit_curve):
        unregister_tool(tool)
    unregister_class(SLCAD_PT_tools_options_object)
    unregister_class(SLCAD_PT_tools_options_mesh)
    unregister_class(SLCAD_PT_tools_options_curve)
    # unregister_class(SLCAD_OT_transform)
    unregister_class(SLCAD_OT_translate)
    unregister_class(SLCAD_OT_rotate)
    unregister_class(SLCAD_OT_scale)
    unregister_class(SLCAD_AddonPreferences)
    unregister_class(SLCAD_keymap)
    print("%s %s successfully disabled" % (bl_info['name'], __version__))

    global icon_man
    icon_man.cleanup()