From 0ed4cadf5ad065a624c6e93d00631cec54315302 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 28 Nov 2018 06:09:42 +1100 Subject: Docs: use float in bpy.app.timer examples Makes it clear seconds are not integers, also avoids conversion to float. --- doc/python_api/examples/bpy.app.timers.2.py | 2 +- doc/python_api/examples/bpy.app.timers.4.py | 4 ++-- doc/python_api/examples/bpy.app.timers.5.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'doc/python_api/examples') 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) -- cgit v1.2.3