Welcome to mirror list, hosted at ThFree Co, Russian Federation.

bpy.app.timers.3.py « examples « python_api « doc - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 79daf6a77401aba056ae08ff7ed168f55da55800 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
"""
Run a Function n times every x seconds
--------------------------------------
"""
import bpy

counter = 0

def run_10_times():
    global counter
    counter += 1
    print(counter)
    if counter == 10:
        return None
    return 0.1

bpy.app.timers.register(run_10_times)