diff options
-rw-r--r-- | doc/python_api/rst/info_gotcha.rst | 8 |
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? ------------------------------- |