Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing image extension in the exported COA tools JSON file #27

Open
themvl opened this issue Apr 21, 2019 · 3 comments
Open

Missing image extension in the exported COA tools JSON file #27

themvl opened this issue Apr 21, 2019 · 3 comments
Labels
bug Something isn't working

Comments

@themvl
Copy link

themvl commented Apr 21, 2019

I got this error when trying to load the json produced by the COA exporter in COA tools for blender:
Info: leglowerback.png Sprite created.
Traceback (most recent call last):
File "/home/mvl/.config/blender/2.79/scripts/addons/coa_tools/operators/import_sprites.py", line 135, in execute
obj = bpy.data.objects[sprite["name"]]
KeyError: 'bpy_prop_collection[key]: key "leglowerback" not found'

location: :-1

location: :-1

After comparing the json with the one from the example files i noticed their names have a file extension while the exporter does not add this. In this case making "name" : "leglowerback" into "name" : "leglowerback.png" fixed the issue. I changed line 78 in COATools.py to
"name": child.name+".png",
which did it as a temporary fix but as you might have noticed this does not take into account the file extension in the config file. I have not been successful in doing this so i will leave that bit to you guys.

@NathanLovato NathanLovato added the bug Something isn't working label Apr 22, 2019
@NathanLovato NathanLovato changed the title Error when loading .json in blender COA tools Missing image extension in the exported COA tools JSON file Apr 22, 2019
@NathanLovato
Copy link
Contributor

Thanks for the report!

@Larpon
Copy link
Contributor

Larpon commented Jul 23, 2019

I can't reproduce this with current master?

@Larpon
Copy link
Contributor

Larpon commented Jul 23, 2019

@themvl a .kra file with the layers selected (or instructions to reproduce) would be a big help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants