Closed egore closed 3 years ago
Hi! Thanks for the PR. Do you know anything about why I'm getting:
Traceback (most recent call last):
File "/home/owner/.config/blender/2.83/scripts/addons/io_import_x/__init__.py", line 237, in execute
return import_x.load(self, context, **keywords)
File "/home/owner/.config/blender/2.83/scripts/addons/io_import_x/import_x.py", line 1015, in load
import_dXtree(rootTokens, item_file.name)
File "/home/owner/.config/blender/2.83/scripts/addons/io_import_x/import_x.py", line 699, in import_dXtree
ob = [parentname, Matrix() * global_matrix, []]
TypeError: Element-wise multiplication: not supported between 'Matrix' and 'Matrix' types
when I load minetest/games/Bucket_Game/mods/codercore/default/models/ from Bucket_Game.zip under "Games and Worlds" at downloads.minetest.org? It is a hand-edited x file (2 copies of mesh with different UV maps or something like that).
See also (in same zip):
I am using Blender 2.83.1. What version do you have?
@egore I need more information about why it doesn't work and what version you used.
I was browsing around and found that this tool was still "somewhat" relevant. I'll be in need of an importer/exporter for .x files in the near future so if they never decide to show up and give any information I could try to debug the code myself if you need any help with it.
I'm also having issues with this PR as well. I'm trying to import one of the models from BugSnax (devs provided all the models with bones & animations) and I'm getting errors. I'm on 2.9.1
Python: Traceback (most recent call last):
File "C:\Users\Daniel\AppData\Roaming\Blender Foundation\Blender\2.91\scripts\addons\io_import_x-master\__init__.py", line 237, in execute
return import_x.load(self, context, **keywords)
File "C:\Users\Daniel\AppData\Roaming\Blender Foundation\Blender\2.91\scripts\addons\io_import_x-master\import_x.py", line 1015, in load
import_dXtree(rootTokens, item_file.name)
File "C:\Users\Daniel\AppData\Roaming\Blender Foundation\Blender\2.91\scripts\addons\io_import_x-master\import_x.py", line 708, in import_dXtree
child = import_dXtree(getChilds(tokenname), lvl + 1)
File "C:\Users\Daniel\AppData\Roaming\Blender Foundation\Blender\2.91\scripts\addons\io_import_x-master\import_x.py", line 658, in import_dXtree
ob = getMesh(parentname, tokenname)
File "C:\Users\Daniel\AppData\Roaming\Blender Foundation\Blender\2.91\scripts\addons\io_import_x-master\import_x.py", line 841, in getMesh
mat.diffuse_color = diffuse_color
ValueError: bpy_struct: item.attr = val: sequences of dimension 0 should contain 4 items, not 3
location: <unknown location>:-1
I was browsing around and found that this tool was still "somewhat" relevant. I'll be in need of an importer/exporter for .x files in the near future so if they never decide to show up and give any information I could try to debug the code myself if you need any help with it.
@CravenWarrior3 Yes, at this point I need help. Once I start to make or fix Blender add-on, the API changes, so I'm not very familiar with Blender 2.8+ especially when it comes to materials, and I don't know whether 2.91 is similar (hopefully the API is stabilizing). If you/anyone fork his repo and offer a different PR that would be most helpful.
I figured out how to fix the additional issues (tested in 2.8 at least) so I'll merge then add my fixes. Thanks.
This branch enables io_import_x to use blender 2.8 APIs as well as bringing compatibility with python 3.8 (while being compatible with earlier python versions)