Fix (unreported) missing updates after `scene.update()` removal...
authorBastien Montagne <montagne29@wanadoo.fr>
Tue, 4 Jun 2019 12:39:22 +0000 (14:39 +0200)
committerBastien Montagne <montagne29@wanadoo.fr>
Tue, 4 Jun 2019 12:39:22 +0000 (14:39 +0200)
add_advanced_objects_menu/mesh_easylattice.py
add_advanced_objects_panels/object_laplace_lightning.py
space_view3d_library_hide.py

index 6c8fa49..a1e4f70 100644 (file)
@@ -257,7 +257,7 @@ def main(context, lat_props):
         bpy.ops.object.select_pattern(pattern=lat.name, extend=False)
         context.view_layer.objects.active = lat
 
-        context.scene.update()
+        context.view_layer.update()
 
     return
 
index ece0640..dfb64cb 100644 (file)
@@ -336,7 +336,7 @@ def writeArrayToCubes(arr, gridBU, orig, cBOOL=False, jBOOL=True):
                 col = (0.0, 0.0, a[3], 1.0)
             ob.color = col
         bpy.context.collection.objects.link(ob)
-        bpy.context.scene.update()
+        bpy.context.view_layer.update()
 
     if jBOOL:
         # Selects all cubes w/ ?bpy.ops.object.join() b/c
index dd82c99..c5875b0 100644 (file)
@@ -134,7 +134,7 @@ def pick_object(context, event, pick_objects, ray_max=10000.0):
 
         #if best_obj_parent:
         #    best_obj_parent.update_tag(refresh={'OBJECT'})
-        #scene.update()
+        #context.view_layer.update()
         return True
     else:
         print("found none")