diff options
author | Vilem Duha <vilem.duha@gmail.com> | 2019-05-19 19:38:53 +0300 |
---|---|---|
committer | Vilem Duha <vilem.duha@gmail.com> | 2019-05-19 19:38:53 +0300 |
commit | b539bd244926c83d1b57a3b6ee1098f4af775ab2 (patch) | |
tree | 9e4513066eecff7340c5ffbbf1fe747da791c4de | |
parent | 99a9da09d370d0753450000d3f074fe0f230c417 (diff) |
BlenderKit: get rid of scene.update()
-rw-r--r-- | blenderkit/autothumb_material_bg.py | 4 | ||||
-rw-r--r-- | blenderkit/autothumb_model_bg.py | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/blenderkit/autothumb_material_bg.py b/blenderkit/autothumb_material_bg.py index 824a0190..6d30f0ff 100644 --- a/blenderkit/autothumb_material_bg.py +++ b/blenderkit/autothumb_material_bg.py @@ -66,7 +66,7 @@ if __name__ == "__main__": = data['thumbnail_background_lightness'] tscale = data["thumbnail_scale"] bpy.context.view_layer.objects['scaler'].scale = (tscale, tscale, tscale) - s.update() + bpy.context.view_layer.update() for ob in bpy.context.visible_objects: if ob.name[:15] == 'MaterialPreview': ob.material_slots[0].material = mat @@ -81,7 +81,7 @@ if __name__ == "__main__": ts = data['texture_size_meters'] # if data["thumbnail_type"] in ['BALL', 'CUBE']: # utils.automap(ob.name, tex_size = ts / tscale, bg_exception=True) - s.update() + bpy.context.view_layer.update() s.cycles.volume_step_size = tscale * .1 diff --git a/blenderkit/autothumb_model_bg.py b/blenderkit/autothumb_model_bg.py index 7ed0aa7d..64f10d83 100644 --- a/blenderkit/autothumb_model_bg.py +++ b/blenderkit/autothumb_model_bg.py @@ -68,7 +68,7 @@ def center_obs_for_thumbnail(obs): coef = .7 r *= coef camZ.scale = (r, r, r) - s.update() + bpy.context.view_layer.update() def render_thumbnails(): |