Skip to content
Snippets Groups Projects
Commit b13fa85e authored by Pratik Borhade's avatar Pratik Borhade Committed by Philipp Oeser
Browse files

Fix T98902: Btracer Particle Trace is broken

Problem has been introduced after python 3.10 upgrade
This patch explicitly casts input parameters to int

Maniphest Tasks: T98902

Differential Revision: https://developer.blender.org/D15225
parent aa5b8593
No related branches found
No related tags found
No related merge requests found
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
bl_info = { bl_info = {
"name": "BTracer", "name": "BTracer",
"author": "liero, crazycourier, Atom, Meta-Androcto, MacKracken", "author": "liero, crazycourier, Atom, Meta-Androcto, MacKracken",
"version": (1, 2, 3), "version": (1, 2, 4),
"blender": (2, 80, 0), "blender": (2, 80, 0),
"location": "View3D > Sidebar > Create Tab", "location": "View3D > Sidebar > Create Tab",
"description": "Tools for converting/animating objects/particles into curves", "description": "Tools for converting/animating objects/particles into curves",
......
...@@ -303,9 +303,9 @@ class OBJECT_OT_particletrace(Operator): ...@@ -303,9 +303,9 @@ class OBJECT_OT_particletrace(Operator):
spline = tracer[0].splines.new('BEZIER') spline = tracer[0].splines.new('BEZIER')
# add point to spline based on step size # add point to spline based on step size
spline.bezier_points.add((x.lifetime - 1) // particle_step) spline.bezier_points.add(int((x.lifetime - 1) // particle_step))
for t in list(range(int(x.lifetime))): for t in list(range(int(x.lifetime))):
bpy.context.scene.frame_set(t + x.birth_time) bpy.context.scene.frame_set(int(t + x.birth_time))
if not t % particle_step: if not t % particle_step:
p = spline.bezier_points[t // particle_step] p = spline.bezier_points[t // particle_step]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment