DXF importer: fails to import when "center geometry to scene" is enabled #104550

Closed
opened 2023-04-17 12:45:45 +02:00 by Luca Saiani · 1 comment

System Information
Operating system: Linux-6.1.12-gentoo-x86_64-Intel-R-_Xeon-R-CPU_E5-1620_0@_3.60GHz-with-glibc2.36 64 Bits, X11 UI
Graphics card: Quadro K4000/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 470.161.03

Blender Version
Broken: 2.93
Worked: 2.79

Short description of error
DXF importer fails when trying to center imported file:

Traceback (most recent call last):
  File "/home/luca/Software/blender-git/build_linux/bin/3.6/scripts/addons/io_import_dxf/__init__.py", line 521, in execute
    read(self.report, self.filepath, merge_options, self.import_text, self.import_light, self.export_acis,
  File "/home/luca/Software/blender-git/build_linux/bin/3.6/scripts/addons/io_import_dxf/__init__.py", line 101, in read
    errors = do.entities(os.path.basename(filename).replace(".dxf", ""), new_scene)
  File "/home/luca/Software/blender-git/build_linux/bin/3.6/scripts/addons/io_import_dxf/dxfimport/do.py", line 1615, in entities
    self._recenter(scene, name)
  File "/home/luca/Software/blender-git/build_linux/bin/3.6/scripts/addons/io_import_dxf/dxfimport/do.py", line 1382, in _recenter
    bpy.context.screen.scene = scene
AttributeError: 'Screen' object has no attribute 'scene'

Exact steps for others to reproduce the error

  • Import a dxf, with options: "import DXF to new scene" and "Center geometry to scene"

The import fails due the error listed above.

Please find attached a simple dxf file for testing.

**System Information** Operating system: Linux-6.1.12-gentoo-x86_64-Intel-R-_Xeon-R-_CPU_E5-1620_0_@_3.60GHz-with-glibc2.36 64 Bits, X11 UI Graphics card: Quadro K4000/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 470.161.03 **Blender Version** Broken: 2.93 Worked: 2.79 **Short description of error** DXF importer fails when trying to center imported file: ``` Traceback (most recent call last): File "/home/luca/Software/blender-git/build_linux/bin/3.6/scripts/addons/io_import_dxf/__init__.py", line 521, in execute read(self.report, self.filepath, merge_options, self.import_text, self.import_light, self.export_acis, File "/home/luca/Software/blender-git/build_linux/bin/3.6/scripts/addons/io_import_dxf/__init__.py", line 101, in read errors = do.entities(os.path.basename(filename).replace(".dxf", ""), new_scene) File "/home/luca/Software/blender-git/build_linux/bin/3.6/scripts/addons/io_import_dxf/dxfimport/do.py", line 1615, in entities self._recenter(scene, name) File "/home/luca/Software/blender-git/build_linux/bin/3.6/scripts/addons/io_import_dxf/dxfimport/do.py", line 1382, in _recenter bpy.context.screen.scene = scene AttributeError: 'Screen' object has no attribute 'scene' ``` **Exact steps for others to reproduce the error** - Import a dxf, with options: "import DXF to new scene" and "Center geometry to scene" The import fails due the error listed above. Please find attached a simple dxf file for testing.
Luca Saiani added the
Priority
Normal
Type
Report
Status
Needs Triage
labels 2023-04-17 12:45:45 +02:00
Blender Bot added
Status
Resolved
and removed
Status
Confirmed
labels 2023-04-17 20:39:24 +02:00
Author

Thank you all, now it works as expected

Thank you all, now it works as expected
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender-addons#104550
No description provided.