add testing scripts

This commit is contained in:
jrkb 2025-05-31 19:57:11 +02:00
parent 6160b99c93
commit bb0a5a4a2c
2 changed files with 140 additions and 0 deletions

View file

@ -0,0 +1,25 @@
import bpy
from mathutils import *
from math import *
import abc3d.butils
v = 0
goal = 5.0
step = 0.1
speed = 1.0
C = bpy.context
obj = C.scene.objects['Cube']
curve = C.scene.objects['BézierCurve']
m = curve.matrix
def fun(distance):
obj.location = m @ abc3d.butils.calc_point_on_bezier_curve(curve,
distance,
output_tangent=True)
print(f"executed {distance}")
while v < goal:
bpy.app.timers.register(lambda: fun(v), first_interval=(v * speed))
v += step