Collections! Blender 2.80 replaced groups and scene layers with collections. In this chapter of Scripting for Artists, Sybren explains how to handle them from your scripts.
- Accessing collections from Python 00:48
- Creating collections 04:44
- Linking objects to collections 8:09
- Moving objects between collections 8:59
- Handling errors when they occur 11:08
- Setting visibility flags 14:47
More Scripting for Artists at https://cloud.blender.org/p/scripting-for-artists/
Support core Blender development - https://fund.blender.org