3D-Print Toolbox - Bounds: Exception when no object is selected #82760

Closed
opened 2020-11-16 11:53:51 +01:00 by Robert Guetzkow · 4 comments

System Information
Operating system: Windows-10-10.0.19041-SP0 64 Bits
Graphics card: GeForce GTX 1080 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 456.43

Blender Version
Broken: version: 2.92.0 Alpha, branch: master, commit date: 2020-11-16 07:27, hash: blender/blender@8fd27c152a
Worked: (newest version of Blender that worked as expected)

Addon Information
Name: 3D-Print Toolbox
Author: Campbell Barton

Short description of error
An exception is thrown when no object is selected and Sidebar > 3D-Print > Transform > Bounds (bpy.ops.mesh.print3d_scale_to_bounds()) is used.

This is a proper report for the issue originally reported in #81716

Exact steps for others to reproduce the error

  • Deselect all objects
  • Click Sidebar > 3D-Print > Transform > Bounds
Python: Traceback (most recent call last):

File "Z:\01_git\01_contribution\blender-git\build_windows_Release_x64_vc16_Release\bin\RelWithDebInfo\2.92\scripts\addons\object_print3d_utils\operators.py", line 680, in invoke
Vector(v) @ obj.matrix_world for obj in context.selected_editable_objects
File "Z:\01_git\01_contribution\blender-git\build_windows_Release_x64_vc16_Release\bin\RelWithDebInfo\2.92\scripts\addons\object_print3d_utils\operators.py", line 671, in calc_length
return max(((max(v[i] for v in vecs) - min(v[i] for v in vecs)), i) for i in range(3))
File "Z:\01_git\01_contribution\blender-git\build_windows_Release_x64_vc16_Release\bin\RelWithDebInfo\2.92\scripts\addons\object_print3d_utils\operators.py", line 671, in
return max(((max(v[i] for v in vecs) - min(v[i] for v in vecs)), i) for i in range(3))

ValueError: max() arg is an empty sequence

location: <unknown location>:-1
Error: Python: Traceback (most recent call last):

File "Z:\01_git\01_contribution\blender-git\build_windows_Release_x64_vc16_Release\bin\RelWithDebInfo\2.92\scripts\addons\object_print3d_utils\operators.py", line 680, in invoke
Vector(v) @ obj.matrix_world for obj in context.selected_editable_objects
File "Z:\01_git\01_contribution\blender-git\build_windows_Release_x64_vc16_Release\bin\RelWithDebInfo\2.92\scripts\addons\object_print3d_utils\operators.py", line 671, in calc_length
return max(((max(v[i] for v in vecs) - min(v[i] for v in vecs)), i) for i in range(3))
File "Z:\01_git\01_contribution\blender-git\build_windows_Release_x64_vc16_Release\bin\RelWithDebInfo\2.92\scripts\addons\object_print3d_utils\operators.py", line 671, in
return max(((max(v[i] for v in vecs) - min(v[i] for v in vecs)), i) for i in range(3))

ValueError: max() arg is an empty sequence

location: <unknown location>:-1
**System Information** Operating system: Windows-10-10.0.19041-SP0 64 Bits Graphics card: GeForce GTX 1080 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 456.43 **Blender Version** Broken: version: 2.92.0 Alpha, branch: master, commit date: 2020-11-16 07:27, hash: `blender/blender@8fd27c152a` Worked: (newest version of Blender that worked as expected) **Addon Information** Name: 3D-Print Toolbox Author: Campbell Barton **Short description of error** An exception is thrown when no object is selected and *Sidebar > 3D-Print > Transform > Bounds* (`bpy.ops.mesh.print3d_scale_to_bounds()`) is used. This is a proper report for the issue originally reported in #81716 **Exact steps for others to reproduce the error** - Deselect all objects - Click *Sidebar > 3D-Print > Transform > Bounds* ```lines Python: Traceback (most recent call last): ``` File "Z:\01_git\01_contribution\blender-git\build_windows_Release_x64_vc16_Release\bin\RelWithDebInfo\2.92\scripts\addons\object_print3d_utils\operators.py", line 680, in invoke Vector(v) @ obj.matrix_world for obj in context.selected_editable_objects File "Z:\01_git\01_contribution\blender-git\build_windows_Release_x64_vc16_Release\bin\RelWithDebInfo\2.92\scripts\addons\object_print3d_utils\operators.py", line 671, in calc_length return max(((max(v[i] for v in vecs) - min(v[i] for v in vecs)), i) for i in range(3)) File "Z:\01_git\01_contribution\blender-git\build_windows_Release_x64_vc16_Release\bin\RelWithDebInfo\2.92\scripts\addons\object_print3d_utils\operators.py", line 671, in <genexpr> return max(((max(v[i] for v in vecs) - min(v[i] for v in vecs)), i) for i in range(3)) ``` ValueError: max() arg is an empty sequence location: <unknown location>:-1 Error: Python: Traceback (most recent call last): ``` File "Z:\01_git\01_contribution\blender-git\build_windows_Release_x64_vc16_Release\bin\RelWithDebInfo\2.92\scripts\addons\object_print3d_utils\operators.py", line 680, in invoke Vector(v) @ obj.matrix_world for obj in context.selected_editable_objects File "Z:\01_git\01_contribution\blender-git\build_windows_Release_x64_vc16_Release\bin\RelWithDebInfo\2.92\scripts\addons\object_print3d_utils\operators.py", line 671, in calc_length return max(((max(v[i] for v in vecs) - min(v[i] for v in vecs)), i) for i in range(3)) File "Z:\01_git\01_contribution\blender-git\build_windows_Release_x64_vc16_Release\bin\RelWithDebInfo\2.92\scripts\addons\object_print3d_utils\operators.py", line 671, in <genexpr> return max(((max(v[i] for v in vecs) - min(v[i] for v in vecs)), i) for i in range(3)) ``` ValueError: max() arg is an empty sequence location: <unknown location>:-1 ```
Author
Member

Added subscriber: @rjg

Added subscriber: @rjg

#81554 was marked as duplicate of this issue

#81554 was marked as duplicate of this issue
Author
Member

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'
Member

Added subscribers: @Wabba, @PratikPB2123

Added subscribers: @Wabba, @PratikPB2123
Blender Bot added
Status
Resolved
and removed
Status
Confirmed
labels 2024-03-23 11:56:06 +01:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
3 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#82760
No description provided.