diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2019-06-04 15:36:53 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2019-06-04 15:39:51 +0300 |
commit | 33e8db94b1e7df2bd7fdbf15b96368c8d16d3b4e (patch) | |
tree | 949716a11cd46cf023cf0340dd42077f86843a04 /release | |
parent | 1d2e4c44bddeb21e04f6ef73b96b51a759a3352e (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')
-rw-r--r-- | release/scripts/modules/bpy/ops.py | 3 | ||||
-rw-r--r-- | release/scripts/templates_py/background_job.py | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/release/scripts/modules/bpy/ops.py b/release/scripts/modules/bpy/ops.py index 41fb0e411de..0697b7fddc9 100644 --- a/release/scripts/modules/bpy/ops.py +++ b/release/scripts/modules/bpy/ops.py @@ -160,7 +160,8 @@ class BPyOpsSubModOp: else: import bpy for scene in bpy.data.scenes: - scene.update() + for view_layer in scene.view_layers: + view_layer.update() __doc__ = property(_get_doc) 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) |