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:
authorSybren A. Stüvel <sybren@stuvel.eu>2015-08-25 14:42:09 +0300
committerSybren A. Stüvel <sybren@stuvel.eu>2015-08-25 14:42:09 +0300
commitba5807c2710939cf8171fb19830f82cece48759f (patch)
tree77c7c9eddca6c63ff84850cd0db9f6bf485e660a /doc
parent6f7eb623d3beaf7e49b5bb0d7686c2b2c714d867 (diff)
BGE: added bge.logic.{get,set}AnimRecordFrame functions
By using getAnimRecordFrame(), game developers have access to the frame number used by the "Record animation" feature. This enables them to record additional information in Blender's F-Curves and ensuring perfect synchronization with the information already recorded by Blender. The setAnimRecordFrame() can be used to change the frame number at which animations are recorded, for example to introduce delays the recording that do not require delays in the actual game/simulation run. The getter/setter functions in KX_KetsjiEngine are not directly named after property they access (m_currentFrame). I found "current frame" to be too vague for a public interface, hence chose a more descriptive name. Reviewers: moguri, hg1, campbellbarton, panzergame, aligorith Reviewed By: panzergame, aligorith Differential Revision: https://developer.blender.org/D1449
Diffstat (limited to 'doc')
-rw-r--r--doc/python_api/rst/bge.logic.rst22
1 files changed, 22 insertions, 0 deletions
diff --git a/doc/python_api/rst/bge.logic.rst b/doc/python_api/rst/bge.logic.rst
index ab1f647f7c8..57d9f1ab5e5 100644
--- a/doc/python_api/rst/bge.logic.rst
+++ b/doc/python_api/rst/bge.logic.rst
@@ -337,6 +337,28 @@ General functions
.. warning: Not implimented yet
+.. function:: getAnimRecordFrame()
+
+ Gets the current frame number used for recording animations. This
+ number is incremented automatically by Blender when the "Record
+ animation" feature is turned on.
+
+ :rtype: int
+
+.. function:: setAnimRecordFrame(framenr)
+
+ Sets the current frame number used for recording animations. This
+ number is automatically incremented by Blender when the "Record
+ animation" feature is turned on.
+
+ The frame number Must be non-negative, unless Blender has
+ :attr:`bpy.types.UserPreferencesEdit.use_negative_frames` enabled
+ in its user preferences. Only use non-negative numbers to be on
+ the safe side, unless you know what you are doing.
+
+ :arg framenr: The new frame number.
+ :type framenr: int
+
.. function:: getExitKey()
Gets the key used to exit the game engine