forked from blender/blender-addons
Extra objects: Fix TypeError when torus knot added
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. Cast division value explicity to int to fix the problem. Pull Request: blender/blender-addons#104810
This commit is contained in:
parent
9d5a6ef938
commit
08ec3386cd
@ -700,7 +700,7 @@ class torus_knot_plus(Operator, AddObjectHelper):
|
||||
print("Approximate average TK length = %.2f" % avgTKLen)
|
||||
|
||||
# x N factor = control points per unit length
|
||||
self.torus_res = max(3, avgTKLen / links * 8)
|
||||
self.torus_res = max(3, int(avgTKLen / links) * 8)
|
||||
|
||||
# update align matrix
|
||||
self.align_matrix = align_matrix(self, context)
|
||||
|
Loading…
x
Reference in New Issue
Block a user