Python API Docs: Examples for new timer api
This commit is contained in:
12
doc/python_api/examples/bpy.app.timers.4.py
Normal file
12
doc/python_api/examples/bpy.app.timers.4.py
Normal file
@@ -0,0 +1,12 @@
|
||||
"""
|
||||
Assign parameters to functions
|
||||
------------------------------
|
||||
"""
|
||||
import bpy
|
||||
import functools
|
||||
|
||||
def print_message(message):
|
||||
print("Message:", message)
|
||||
|
||||
bpy.app.timers.register(functools.partial(print_message, "Hello"), first_interval=2)
|
||||
bpy.app.timers.register(functools.partial(print_message, "World"), first_interval=3)
|
||||
Reference in New Issue
Block a user