Script to count and stop up to 5 seconds in Python in Blender Repeated every seconds of the value specified by return
Personal notes
import bpy
class test():
i = 1
def every_seconds(self):
print(self.i)
self.i = self.i + 1
if self.i > 5:
return None
else:
return 1.0
test = test()
bpy.app.timers.register(test.every_seconds)
reference https://docs.blender.org/api/current/bpy.app.timers.html
Recommended Posts