sketchfab / blender-plugin

Apache License 2.0
1.14k stars 122 forks source link

Can't import models #155

Open secretgspot opened 1 week ago

secretgspot commented 1 week ago

Blender latest 4.2.3 LTS on Windows 10 Search for something like a chair, select and click Import, get an error. (works if switch to cycles)

Python: Traceback (most recent call last): File "C:\Users\Me\AppData\Roaming\Blender Foundation\Blender\4.2\scripts\addons\sketchfab-plugin-1-6-1__init__.py", line 1393, in modal bpy.context.scene.render.engine = "BLENDER_EEVEE" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: bpy_struct: item.attr = val: enum "BLENDER_EEVEE" not found in ('BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH', 'CYCLES')

MrHyplex9511 commented 6 days ago

In Blender 4.2 it was not working then i troubleshooted the problem cuz i am a skid.

I found out that if the error is fix line 1393, then open the innit.py file in the (C:\Users\Your user\AppData\Roaming\Blender Foundation\Blender\4.2\scripts\addons\sketchfab-plugin-1-6-1/innit.py) and go to line 1393. As shown below and

1392 if bpy.context.scene.render.engine not in ["CYCLES", "BLENDER_EEVEE"]: 1393 bpy.context.scene.render.engine = "BLENDER_EEVEE" <---------- Change BLENDER_EEVEE to BLENDER_EEVEE_NEXT 1394 try:

After fix it should look like this.

bpy.context.scene.render.engine = "BLENDER_EEVEE_NEXT"

Then save the file and relaunch blender. It should work

or replace your "innit.py" file with This one replace the file with the mentioned above