From b539bd244926c83d1b57a3b6ee1098f4af775ab2 Mon Sep 17 00:00:00 2001 From: Vilem Duha Date: Sun, 19 May 2019 18:38:53 +0200 Subject: BlenderKit: get rid of scene.update() --- blenderkit/autothumb_material_bg.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'blenderkit/autothumb_material_bg.py') 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 -- cgit v1.2.3