Fix ply import tests.
authorHoward Trickey <howard.trickey@gmail.com>
Thu, 4 Apr 2019 12:50:17 +0000 (08:50 -0400)
committerHoward Trickey <howard.trickey@gmail.com>
Thu, 4 Apr 2019 12:50:17 +0000 (08:50 -0400)
The function for clearing out objects in the startup file
needed updating for 2.8 collections api.

tests/python/bl_test.py

index ceb5811..173d575 100644 (file)
@@ -44,9 +44,9 @@ def replace_bpy_app_version():
 def clear_startup_blend():
     import bpy
 
-    for scene in bpy.data.scenes:
-        for obj in scene.objects:
-            scene.objects.unlink(obj)
+    for col in bpy.data.collections:
+        for obj in col.objects:
+            col.objects.unlink(obj)
 
 
 def blend_to_md5():