30350n / pcb2blender

KiCad to Blender 3D model workflow
GNU General Public License v3.0
546 stars 12 forks source link

PCB turns black after saving #16

Closed mtribiere closed 1 year ago

mtribiere commented 1 year ago

Environment

PCB2Blender v2.4 Blender 3.4.1 Kicad 7.0.1

Step to reproduce

What happens

The PCB in the scene turn completely black Capture d’écran 2023-04-25 090551

What should happen

The PCB should appear normally

mtribiere commented 1 year ago

Probably a duplicate of #15, since the workaround worked too.

Summary:

30350n commented 1 year ago

Hm this is odd, this shouldn't be happening in 3.4. Before disabling/enableing the addon, are the any errors in the system console? If not, can you share a screenshot of the node tree?

30350n commented 1 year ago

Also, here is a prerelease of the addon for Blender 3.5.1 (there is a bug in 3.5.0 which made the addon hard crash blender). I'd be curious if you get the same behavior there.

mtribiere commented 1 year ago

There is indeed an error in the system console before I load my scene:

Read prefs: C:\Users\Matthieu\AppData\Roaming\Blender Foundation\Blender\3.4\config\userpref.blend
Traceback (most recent call last):
  File "C:\Program Files\Blender Foundation\Blender 3.4\3.4\scripts\modules\addon_utils.py", line 333, in enable
    mod = __import__(module_name)
  File "C:\Users\Matthieu\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\pcb2blender_importer\__init__.py", line 22, in <module>
    add_dependencies(deps, no_extra_deps=True)
  File "C:\Users\Matthieu\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\pcb2blender_importer\blender_addon_utils\register.py", line 78, in add_dependencies
    if not importlib.util.find_spec(module):
AttributeError: module 'importlib' has no attribute 'util'
mtribiere commented 1 year ago

Just installed and tried on Blender 3.5.1, I can confirm the pre-release fixed the issue

30350n commented 1 year ago

Ah yeah the weird importlib bug, I fixed that in the 3.5 version. Maybe I should backport that to 3.4 ...

mtribiere commented 1 year ago

Maybe open an issue in Blender? Must be crowded place though

30350n commented 1 year ago

That's not really a Blender bug, more of a weird python behavior. (It's my code that's causing the issue.)

mtribiere commented 1 year ago

Make sense, I leave the issue open then so you can close it with your commit

30350n commented 1 year ago

This is fixed in the v2.6 release.