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

bge.types.KX_LibLoadStatus.rst « bge_types « rst « python_api « doc - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: a37b4dad5857d71cdbfd09e4d907a6098741d786 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
KX_LibLoadStatus(PyObjectPlus)
==============================

.. module:: bge.types

base class --- :class:`PyObjectPlus`

.. class:: KX_LibLoadStatus(PyObjectPlus)

   An object providing information about a LibLoad() operation.

   .. code-block:: python

      # Print a message when an async LibLoad is done
      import bge

      def finished_cb(status):
          print("Library (%s) loaded in %.2fms." % (status.libraryName, status.timeTaken))

      bge.logic.LibLoad('myblend.blend', 'Scene', async=True).onFinish = finished_cb

   .. attribute:: onFinish

      A callback that gets called when the lib load is done.

      :type: callable

   .. attribute:: finished

      The current status of the lib load.

      :type: boolean

   .. attribute:: progress

      The current progress of the lib load as a normalized value from 0.0 to 1.0.

      :type: float

   .. attribute:: libraryName

      The name of the library being loaded (the first argument to LibLoad).

      :type: string

   .. attribute:: timeTaken

      The amount of time, in seconds, the lib load took (0 until the operation is complete).

      :type: float