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
900 stars 139 forks source link

AttributeError: 'NoneType' object has no attribute 'name' When trying to Import sprites #130

Closed alcalyn closed 5 years ago

alcalyn commented 5 years ago

I just installed Blender 2.80 and Coa Tools 2.0.0.

When I try to import sprites, I get this error:

Traceback (most recent call last):
  File "/home/alcalyn/.config/blender/2.80/scripts/addons/coa_tools/operators/import_sprites.py", line 212, in execute
    sprite_object.name = sprite_data["name"]
AttributeError: 'NoneType' object has no attribute 'name'

To reproduce:

Expected:

My sprites are imported

Currently:

I get this error.

I looks like functions.get_sprite_object(context.active_object) returns None.

Same when I "Add armature" first, context.active_object is an instance of Armature (<bpy_struct, Object("Armature")>), but get the same error.

alcalyn commented 5 years ago

Also, when I got in "Pose mode", I get a different error when importing sprites:

Traceback (most recent call last):
  File "/home/alcalyn/.config/blender/2.80/scripts/addons/coa_tools/operators/import_sprites.py", line 407, in execute
    context.space_data.shading.type = "RENDERED"
AttributeError: 'Space' object has no attribute 'shading'
alcalyn commented 5 years ago

Well I found how to use it.

Finally I have found the COA tools menu, it has changed from v1.4.

In 3D view, I had to open the menu at right, the little "<". Then I have the COA tools tab, where I can "Create a new sprite object". Then I recognize the menu, and I can import sprites.