martijnberger / pyslapi

Python bindings for the official Sketchup API
237 stars 134 forks source link

Import Error #43

Open mrbeandev opened 3 years ago

mrbeandev commented 3 years ago

when I try importing my SketchUp file to the blender, I find the following issues

I tried many versions of Sketchup files.

2021 SketchUp version file - nothing gets imported to blender 2017 and all other SketchUp version file - I get the following error

` Python: Traceback (most recent call last): File "C:\Users\gtula\AppData\Roaming\Blender Foundation\Blender\2.92\scripts\addons\SketchUp_Importer__init.py", line 886, in execute context, **keywords) File "C:\Users\gtula\AppData\Roaming\Blender Foundation\Blender\2.92\scripts\addons\SketchUp_Importer__init__.py", line 185, in load self.write_duplicateable_groups() File "C:\Users\gtula\AppData\Roaming\Blender Foundation\Blender\2.92\scripts\addons\SketchUp_Importer__init__.py", line 245, in write_duplicateable_groups group=group) File "C:\Users\gtula\AppData\Roaming\Blender Foundation\Blender\2.92\scripts\addons\SketchUp_Importer\init.py", line 640, in conponent_def_as_group group=group) File "C:\Users\gtula\AppData\Roaming\Blender Foundation\Blender\2.92\scripts\addons\SketchUp_Importer\init__.py", line 614, in conponent_def_as_group ob.layers = 18 * [False] + [True] + [False] AttributeError: 'Object' object has no attribute 'layers'

location: :-1 `

How to fix this?

My SketchUp file : 2017 Version - All floor Plans.zip << Download Link ⬇ Preview ⬇ image

The Addon : image

Error in Blender : image

mrbeandev commented 3 years ago

Fixed !!

Actually the code of the add-on needs to be updated cause the new version of SketchUp 2021 has removed layers object and replaced it with another name as "Tags" So when I save my .skp file in 2021 it was saving it with "Tags" object instead of "layers"

So the solution for this issue is to use the 2020 version of SketchUp

It worked for me when I tried the same model in the 2020 SketchUp version application