active property for collections for things like scene.objects.active
[blender.git] / release / scripts / io / add_mesh_torus.py
index 8a6a3a58ed60ca86f9b1209e96c45b3857786681..27ef587ce5aa4da2ae5d227f447df2607de26219 100644 (file)
@@ -117,7 +117,7 @@ class AddTorusPrimitive(bpy.types.Operator):
         ob_new = bpy.data.add_object('MESH', "Torus")
         ob_new.data = mesh
         scene.add_object(ob_new)
-        scene.active_object = ob_new
+        scene.objects.active = ob_new
         ob_new.selected = True
 
         ob_new.location = tuple(context.scene.cursor_location)