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

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-11-27 22:09:42 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-11-27 22:09:42 +0300
commit0ed4cadf5ad065a624c6e93d00631cec54315302 (patch)
tree76d8f0220c8f98e6e72aac9bc1c7459333258966 /doc
parente9875fc82cfeb37e9ee382ce74be88ba2c1fd500 (diff)
Docs: use float in bpy.app.timer examples
Makes it clear seconds are not integers, also avoids conversion to float.
Diffstat (limited to 'doc')
-rw-r--r--doc/python_api/examples/bpy.app.timers.2.py2
-rw-r--r--doc/python_api/examples/bpy.app.timers.4.py4
-rw-r--r--doc/python_api/examples/bpy.app.timers.5.py2
3 files changed, 4 insertions, 4 deletions
diff --git a/doc/python_api/examples/bpy.app.timers.2.py b/doc/python_api/examples/bpy.app.timers.2.py
index cdd9bf8e9ff..c663959c209 100644
--- a/doc/python_api/examples/bpy.app.timers.2.py
+++ b/doc/python_api/examples/bpy.app.timers.2.py
@@ -6,6 +6,6 @@ import bpy
def every_2_seconds():
print("Hello World")
- return 2
+ return 2.0
bpy.app.timers.register(every_2_seconds)
diff --git a/doc/python_api/examples/bpy.app.timers.4.py b/doc/python_api/examples/bpy.app.timers.4.py
index a56d0e5f36f..6cdee564bb5 100644
--- a/doc/python_api/examples/bpy.app.timers.4.py
+++ b/doc/python_api/examples/bpy.app.timers.4.py
@@ -8,5 +8,5 @@ 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)
+bpy.app.timers.register(functools.partial(print_message, "Hello"), first_interval=2.0)
+bpy.app.timers.register(functools.partial(print_message, "World"), first_interval=3.0)
diff --git a/doc/python_api/examples/bpy.app.timers.5.py b/doc/python_api/examples/bpy.app.timers.5.py
index b35e307f218..821a047d7c7 100644
--- a/doc/python_api/examples/bpy.app.timers.5.py
+++ b/doc/python_api/examples/bpy.app.timers.5.py
@@ -20,6 +20,6 @@ def execute_queued_functions():
while not execution_queue.empty():
function = execution_queue.get()
function()
- return 1
+ return 1.0
bpy.app.timers.register(execute_queued_functions)