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:
authorBastien Montagne <montagne29@wanadoo.fr>2019-06-04 15:36:53 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2019-06-04 15:39:51 +0300
commit33e8db94b1e7df2bd7fdbf15b96368c8d16d3b4e (patch)
tree949716a11cd46cf023cf0340dd42077f86843a04 /release/scripts/templates_py
parent1d2e4c44bddeb21e04f6ef73b96b51a759a3352e (diff)
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.
Diffstat (limited to 'release/scripts/templates_py')
-rw-r--r--release/scripts/templates_py/background_job.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/release/scripts/templates_py/background_job.py b/release/scripts/templates_py/background_job.py
index c28c7275fce..5410a7d649f 100644
--- a/release/scripts/templates_py/background_job.py
+++ b/release/scripts/templates_py/background_job.py
@@ -48,7 +48,7 @@ def example_function(text, save_path, render_path):
scene.collection.objects.link(light_ob)
light_ob.location = 2.0, 2.0, 5.0
- scene.update()
+ bpy.context.view_layer.update()
if save_path:
bpy.ops.wm.save_as_mainfile(filepath=save_path)