ndee85 / coa_tools

COA Tools is a 2D Animation Suite for blender. It offers a 2D cutout animation workflow similar to programs like spine or spriter.
GNU General Public License v3.0
885 stars 138 forks source link

Not working on Blender 2.83 #167

Closed neirenoir closed 3 months ago

neirenoir commented 4 years ago

After switching to the 2.8 branch, zipping the coa_tools folder and then installing the addon, this error message appears when attempting to enable it:

Traceback (most recent call last):
  File "/nix/store/hm2wkg6g9di39l1729cyixbk23s1gzsz-blender-2.83.0/share/blender/2.83/scripts/modules/addon_utils.py", line 382, in enable
    mod.register()
  File "/home/myuser/.config/blender/2.83/scripts/addons/coa_tools/__init__.py", line 265, in register
    copy_icons()
  File "/home/myuser/.config/blender/2.83/scripts/addons/coa_tools/__init__.py", line 383, in copy_icons
    os.makedirs(dir_path)
  File "/nix/store/f87w21b91cws0wbsvyfn5vnlyv491czi-python3-3.8.3/lib/python3.8/os.py", line 213, in makedirs
    makedirs(head, exist_ok=exist_ok)
  File "/nix/store/f87w21b91cws0wbsvyfn5vnlyv491czi-python3-3.8.3/lib/python3.8/os.py", line 213, in makedirs
    makedirs(head, exist_ok=exist_ok)
  File "/nix/store/f87w21b91cws0wbsvyfn5vnlyv491czi-python3-3.8.3/lib/python3.8/os.py", line 223, in makedirs
    mkdir(name, mode)
OSError: [Errno 30] Read-only file system: '/nix/store/hm2wkg6g9di39l1729cyixbk23s1gzsz-blender-2.83.0/bin/2.83'

While it's true I'm on NixOS and paths aren't exactly standard, I'm not sure why would it be trying to write directly into the Blender installation folder. That would probably fail in any system.

Clicking in the checkbox again returns the following error:

Traceback (most recent call last):
  File "/nix/store/hm2wkg6g9di39l1729cyixbk23s1gzsz-blender-2.83.0/share/blender/2.83/scripts/modules/addon_utils.py", line 382, in enable
    mod.register()
  File "/home/myuser/.config/blender/2.83/scripts/addons/coa_tools/__init__.py", line 264, in register
    addon_updater_ops.register(bl_info)
  File "/home/myuser/.config/blender/2.83/scripts/addons/coa_tools/addon_updater_ops.py", line 1086, in register
    bpy.utils.register_class(addon_updater_install_popup)
ValueError: register_class(...): already registered as a subclass 'addon_updater_install_popup'

I must also note that the first time I tried to enable the addon, I got the same error as in #159, but I haven't been able to reproduce the error again as these are the new error messages I get. I tried to reset Blender to factory settings and try again, but it still will produce these two errors. #160 seems to be related: these icons should be registered in some other way. I can't seem to find where are they used in the code, but they should probably be loaded via ImagePreviewCollection.

Lulullia commented 4 years ago

I have the exact same problem but I'm on Windows 10.

neirenoir commented 4 years ago

That's because the addon currently tries to copy its icon files to the Blender installation directory, which is read-only unless you are running Blender as Administrator. I made a pull request with a patch to fix this, but for the time being, you could download coa_tools from my forked repo and install that.

https://github.com/neirenoir/coa_tools/tree/blender28

Lulullia commented 4 years ago

I didn't expect such a fast reply, especially with a working solution to the problem. Thanks!