From 33e8db94b1e7df2bd7fdbf15b96368c8d16d3b4e Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Tue, 4 Jun 2019 14:36:53 +0200 Subject: Fix (unreported) missing updates in scripts/docs after `scene.update()` removal. This should really have been done together with API changes, simple usage of grep does the trick to catch most places needing updates. --- doc/python_api/rst/info_gotcha.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/python_api/rst/info_gotcha.rst b/doc/python_api/rst/info_gotcha.rst index fd978e235c1..df4cd0d256b 100644 --- a/doc/python_api/rst/info_gotcha.rst +++ b/doc/python_api/rst/info_gotcha.rst @@ -102,16 +102,16 @@ 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: +In this case you need to call :class:`bpy.types.ViewLayer.update` after modifying values, for example: .. code-block:: python bpy.context.object.location = 1, 2, 3 - bpy.context.scene.update() + bpy.context.view_layer.update() Now all dependent data (child objects, modifiers, drivers... etc) -has been recalculated and is available to the script. +has been recalculated and is available to the script within active view layer. Can I redraw during the script? -- cgit v1.2.3