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

Support blender 2.8/2.9 #5

Open
nguyenbs opened this issue Jul 12, 2021 · 6 comments
Open

Support blender 2.8/2.9 #5

nguyenbs opened this issue Jul 12, 2021 · 6 comments

Comments

@nguyenbs
Copy link

Please do support for newest versions of Blender

@davidejones
Copy link
Owner

@nguyenbs I haven't tried the latest versions. Do you have any example of the error or issue with it?

@davidejones
Copy link
Owner

@nguyenbs I tried using the 2.8 and above and see the issues. I think at this point the code needs to be completely rewritten.

In the meantime i hacked something together so you can do a basic import in the newer version. You can try using the io_alternativa3d_tools.py in the branch davidejones/280-support.

For the longterm I might take a look at rewriting this addon its really just depends on how much freetime i have and how much interest there even is in this addon anymore.

@Pyogenics
Copy link
Contributor

Pyogenics commented Jul 10, 2023

I'm aware this isn't really maintained but on blender 3.6.0 (lol), using the sample a3d files provided with this repo, it creates errors when importing anything.
sprite.a3d:

Python: Traceback (most recent call last):
  File "/home/mark/.config/blender/3.6/scripts/addons/io_alternativa3d_tools.py", line 2873, in execute
    A3DImport2(file,Config)
  File "/home/mark/.config/blender/3.6/scripts/addons/io_alternativa3d_tools.py", line 2951, in A3DImport2
    a3d2.render()
  File "/home/mark/.config/blender/3.6/scripts/addons/io_alternativa3d_tools.py", line 4640, in render
    sprite.render(materials,maps,images)
  File "/home/mark/.config/blender/3.6/scripts/addons/io_alternativa3d_tools.py", line 8108, in render
    mtex = surf_mat.texture_slots.add()
           ^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'Material' object has no attribute 'texture_slots'

LOD.a3d copies.a3d linkedcopies.a3d:

Python: Traceback (most recent call last):
  File "/home/mark/.config/blender/3.6/scripts/addons/io_alternativa3d_tools.py", line 2873, in execute
    A3DImport2(file,Config)
  File "/home/mark/.config/blender/3.6/scripts/addons/io_alternativa3d_tools.py", line 2951, in A3DImport2
    a3d2.render()
  File "/home/mark/.config/blender/3.6/scripts/addons/io_alternativa3d_tools.py", line 4634, in render
    mesh.render(ibuffers,vbuffers,materials,maps,images)
  File "/home/mark/.config/blender/3.6/scripts/addons/io_alternativa3d_tools.py", line 5783, in render
    me.vertices[i].normal=norms[i]
    ^^^^^^^^^^^^^^^^^^^^^
AttributeError: bpy_struct: attribute "normal" from "MeshVertex" is read-only

Might see if I can fix these various issues myself perhaps? I don't think I will be needing the a3d format since the a3d engine can import other formats just fine but this seems like an interesting thing to tinker with. I assume that the main issues come from API changes in blender.

@davidejones
Copy link
Owner

@Pyogenics I'm always surprised when someone is using this still! So I had started a larger rewrite of this after the initial comment but didn't get very far because of other work.

I'll see if i can throw together something hacky to make it work in 3.6.0

@davidejones
Copy link
Owner

Hey @Pyogenics If you want to try out this test branch I made using blender 3.6.1 it may work a little better.
https://github.com/davidejones/alternativa3d_tools/tree/davidejones/361-support

@Pyogenics
Copy link
Contributor

Yes, it seemingly worked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants