active_scene
active_scene(context=None)Return the active scene, raising an error if there is none.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| context | bpy.types.Context | None |
The context to read the scene from. Defaults to bpy.context. |
None |
Returns
| Name | Type | Description |
|---|---|---|
bpy.types.Scene |
The active scene. |
Raises
| Name | Type | Description |
|---|---|---|
| ValueError | If the context has no active scene. |