Extra objects: Fix TypeError when torus knot added #104810

Merged
Pratik Borhade merged 1 commits from Patrick-White-4/blender-addons:patrick-white-4-patch-2 into main 2023-08-01 13:41:13 +02:00
Contributor

TypeError is thrown when torus knot + object added with 7*6 preset.
torus_res is an IntProperty, and after python 3.10, implicit conversion
from float to int is not happening. To fix this, cast division value explicitly
to int

TypeError is thrown when `torus knot +` object added with `7*6` preset. `torus_res` is an IntProperty, and after python 3.10, implicit conversion from float to int is not happening. To fix this, cast division value explicitly to int
Patrick-White-4 added 1 commit 2023-08-01 06:29:08 +02:00
a7d6b1b194 Fix Torus Knots exceptions by using int
torus_res is an IntProperty, as the exception so helpfully pointed out :)
To repro, enable the extra curves, add a torus, and pick 7x6.
Pratik Borhade changed title from Fix Torus Knots exceptions by using int to Extra objects: Fix TypeError when torus knot added 2023-08-01 13:38:04 +02:00
Pratik Borhade approved these changes 2023-08-01 13:38:33 +02:00
Pratik Borhade left a comment
Member

Thanks for the PR. Looks correct to me :D

Thanks for the PR. Looks correct to me :D
Member

Edited the title and PR description to explain exact issue and fix

Edited the title and PR description to explain exact issue and fix
Pratik Borhade merged commit 08ec3386cd into main 2023-08-01 13:41:13 +02:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
2 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#104810
No description provided.