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
diff options
context:
space:
mode:
authorGaia Clary <gaia.clary@machinimatrix.org>2015-04-13 11:59:47 +0300
committerGaia Clary <gaia.clary@machinimatrix.org>2015-04-13 12:00:22 +0300
commit6fbf05f326911d10e6227837f8b5de1d86f950b2 (patch)
treefc9d4da21453bf49fa116661c393234b536f03e6 /doc/python_api/rst/info_gotcha.rst
parent4fb33d82e251e340d4ffee8efda62cfeb5c03135 (diff)
Make python gotchas more clear (regarding handling of stale data)
Diffstat (limited to 'doc/python_api/rst/info_gotcha.rst')
-rw-r--r--doc/python_api/rst/info_gotcha.rst8
1 files changed, 7 insertions, 1 deletions
diff --git a/doc/python_api/rst/info_gotcha.rst b/doc/python_api/rst/info_gotcha.rst
index 35f9c1bda9f..aad23112b42 100644
--- a/doc/python_api/rst/info_gotcha.rst
+++ b/doc/python_api/rst/info_gotcha.rst
@@ -86,9 +86,15 @@ Consider the calculations that might go into working out the object's final tran
To avoid expensive recalculations every time a property is modified, Blender defers making the actual calculations until they are needed.
However, while the script runs you may want to access the updated values.
+In this case you need to call :class:`bpy.types.Scene.update` after modifying values, for example:
+
+.. code-block:: python
+
+ bpy.context.object.location = 1, 2, 3
+ bpy.context.scene.update()
-This can be done by calling :class:`bpy.types.Scene.update` after modifying values which recalculates all data that is tagged to be updated.
+Now all dependent data (child objects, modifiers, drivers... etc) has been recalculated and is available to the script.
Can I redraw during the script?
-------------------------------