scene and collection

active scene

get

bpy.context.scene

set

bpy.context.window.scene = bpy.data.scenes['Scene.001']

master collection

bpy.context.scene.collection

While the master collection contains all the Scene’s objects collections of Objects

nested collection

collection = bpy.data.collections.new(name='name')
context.scene.collection.children.link(collection)

view layer

bpy.context.view_layer

Collection をグループ化して可視制御する。