user: Provide the full official documentation entry for Scene(ID), preserving all code examples.

assistant: # Scene(ID)

base classes — [`bpy_struct`](bpy.types.bpy_struct.html#bpy.types.bpy_struct "bpy.types.bpy_struct"), [`ID`](bpy.types.ID.html#bpy.types.ID "bpy.types.ID")

*class* bpy.types.Scene(*ID*)
:   Scene data-block, consisting in objects and defining time and render related settings

    active_clip
    :   Active Movie Clip that can be used by motion tracking constraints or as a camera’s background image

        Type:
        :   [`MovieClip`](bpy.types.MovieClip.html#bpy.types.MovieClip "bpy.types.MovieClip")

    animation_data
    :   Animation data for this data-block

        Type:
        :   [`AnimData`](bpy.types.AnimData.html#bpy.types.AnimData "bpy.types.AnimData"), (readonly)

    annotation
    :   Data-block used for annotations in the 3D view

        Type:
        :   [`Annotation`](bpy.types.Annotation.html#bpy.types.Annotation "bpy.types.Annotation")

    audio_distance_model
    :   Distance model for distance attenuation calculation

        - `NONE`
          None – No distance attenuation.
        - `INVERSE`
          Inverse – Inverse distance model.
        - `INVERSE_CLAMPED`
          Inverse Clamped – Inverse distance model with clamping.
        - `LINEAR`
          Linear – Linear distance model.
        - `LINEAR_CLAMPED`
          Linear Clamped – Linear distance model with clamping.
        - `EXPONENT`
          Exponential – Exponential distance model.
        - `EXPONENT_CLAMPED`
          Exponential Clamped – Exponential distance model with clamping.

        Type:
        :   enum in [`'NONE'`, `'INVERSE'`, `'INVERSE_CLAMPED'`, `'LINEAR'`, `'LINEAR_CLAMPED'`, `'EXPONENT'`, `'EXPONENT_CLAMPED'`], default `'INVERSE_CLAMPED'`

    audio_doppler_factor
    :   Pitch factor for Doppler effect calculation

        Type:
        :   float in [0, inf], default 1.0

    audio_doppler_speed
    :   Speed of sound for Doppler effect calculation

        Type:
        :   float in [0.01, inf], default 343.3

    audio_volume
    :   Audio volume

        Type:
        :   float in [0, 100], default 1.0

    background_set
    :   Background set scene

        Type:
        :   [`Scene`](#bpy.types.Scene "bpy.types.Scene")

    camera
    :   Active camera, used for rendering the scene

        Type:
        :   [`Object`](bpy.types.Object.html#bpy.types.Object "bpy.types.Object")

    collection
    :   Scene root collection that owns all the objects and other collections instantiated in the scene

        Type:
        :   [`Collection`](bpy.types.Collection.html#bpy.types.Collection "bpy.types.Collection"), (readonly, never None)

    compositing_node_group
    :   Compositor Nodes

        Type:
        :   [`NodeTree`](bpy.types.NodeTree.html#bpy.types.NodeTree "bpy.types.NodeTree")

    cursor
    :   Type:
        :   [`View3DCursor`](bpy.types.View3DCursor.html#bpy.types.View3DCursor "bpy.types.View3DCursor"), (readonly, never None)

    cycles
    :   Cycles render settings

        Type:
        :   `CyclesRenderSettings`, (readonly)

    cycles_curves
    :   Cycles curves rendering settings

        Type:
        :   `CyclesCurveRenderSettings`, (readonly)

    display
    :   Scene display settings for 3D viewport

        Type:
        :   [`SceneDisplay`](bpy.types.SceneDisplay.html#bpy.types.SceneDisplay "bpy.types.SceneDisplay"), (readonly)

    display_settings
    :   Settings of device saved image would be displayed on

        Type:
        :   [`ColorManagedDisplaySettings`](bpy.types.ColorManagedDisplaySettings.html#bpy.types.ColorManagedDisplaySettings "bpy.types.ColorManagedDisplaySettings"), (readonly)

    eevee
    :   EEVEE settings for the scene

        Type:
        :   [`SceneEEVEE`](bpy.types.SceneEEVEE.html#bpy.types.SceneEEVEE "bpy.types.SceneEEVEE"), (readonly)

    frame_current
    :   Current frame, to update animation data from Python frame_set() instead

        Type:
        :   int in [-1048574, 1048574], default 1

    frame_current_final
    :   Current frame with subframe and time remapping applied

        Type:
        :   float in [-1.04857e+06, 1.04857e+06], default 0.0, (readonly)

    frame_end
    :   Final frame of the playback/rendering range

        Type:
        :   int in [0, 1048574], default 250

    frame_float
    :   Type:
        :   float in [-1.04857e+06, 1.04857e+06], default 0.0

    frame_preview_end
    :   Alternative end frame for UI playback

        Type:
        :   int in [-inf, inf], default 0

    frame_preview_start
    :   Alternative start frame for UI playback

        Type:
        :   int in [-inf, inf], default 0

    frame_start
    :   First frame of the playback/rendering range

        Type:
        :   int in [0, 1048574], default 1

    frame_step
    :   Number of frames to skip forward while rendering/playing back each frame

        Type:
        :   int in [0, 1048574], default 1

    frame_subframe
    :   Type:
        :   float in [0, 1], default 0.0

    gravity
    :   Constant acceleration in a given direction

        Type:
        :   [`mathutils.Vector`](mathutils.html#mathutils.Vector "mathutils.Vector") of 3 items in [-inf, inf], default (0.0, 0.0, -9.81)

    grease_pencil_settings
    :   Grease Pencil settings for the scene

        Type:
        :   [`SceneGpencil`](bpy.types.SceneGpencil.html#bpy.types.SceneGpencil "bpy.types.SceneGpencil"), (readonly)

    hydra
    :   Hydra settings for the scene

        Type:
        :   [`SceneHydra`](bpy.types.SceneHydra.html#bpy.types.SceneHydra "bpy.types.SceneHydra"), (readonly)

    is_nla_tweakmode
    :   Whether there is any action referenced by NLA being edited (strictly read-only)

        Type:
        :   boolean, default False, (readonly)

    keying_sets
    :   Absolute Keying Sets for this Scene

        Type:
        :   [`KeyingSets`](bpy.types.KeyingSets.html#bpy.types.KeyingSets "bpy.types.KeyingSets") [`bpy_prop_collection`](bpy.types.bpy_prop_collection.html#bpy.types.bpy_prop_collection "bpy.types.bpy_prop_collection") of [`KeyingSet`](bpy.types.KeyingSet.html#bpy.types.KeyingSet "bpy.types.KeyingSet"), (readonly)

    keying_sets_all
    :   All Keying Sets available for use (Builtins and Absolute Keying Sets for this Scene)

        Type:
        :   [`KeyingSetsAll`](bpy.types.KeyingSetsAll.html#bpy.types.KeyingSetsAll "bpy.types.KeyingSetsAll") [`bpy_prop_collection`](bpy.types.bpy_prop_collection.html#bpy.types.bpy_prop_collection "bpy.types.bpy_prop_collection") of [`KeyingSet`](bpy.types.KeyingSet.html#bpy.types.KeyingSet "bpy.types.KeyingSet"), (readonly)

    lock_frame_selection_to_range
    :   Don’t allow frame to be selected with mouse outside of frame range

        Type:
        :   boolean, default False

    objects
    :   Type:
        :   [`SceneObjects`](bpy.types.SceneObjects.html#bpy.types.SceneObjects "bpy.types.SceneObjects") [`bpy_prop_collection`](bpy.types.bpy_prop_collection.html#bpy.types.bpy_prop_collection "bpy.types.bpy_prop_collection") of [`Object`](bpy.types.Object.html#bpy.types.Object "bpy.types.Object"), (readonly)

    render
    :   Type:
        :   [`RenderSettings`](bpy.types.RenderSettings.html#bpy.types.RenderSettings "bpy.types.RenderSettings"), (readonly, never None)

    rigidbody_world
    :   Type:
        :   [`RigidBodyWorld`](bpy.types.RigidBodyWorld.html#bpy.types.RigidBodyWorld "bpy.types.RigidBodyWorld"), (readonly)

    safe_areas
    :   Type:
        :   [`DisplaySafeAreas`](bpy.types.DisplaySafeAreas.html#bpy.types.DisplaySafeAreas "bpy.types.DisplaySafeAreas"), (readonly, never None)

    sequence_editor
    :   Type:
        :   [`SequenceEditor`](bpy.types.SequenceEditor.html#bpy.types.SequenceEditor "bpy.types.SequenceEditor"), (readonly)

    sequencer_colorspace_settings
    :   Settings of color space sequencer is working in

        Type:
        :   [`ColorManagedSequencerColorspaceSettings`](bpy.types.ColorManagedSequencerColorspaceSettings.html#bpy.types.ColorManagedSequencerColorspaceSettings "bpy.types.ColorManagedSequencerColorspaceSettings"), (readonly)

    show_keys_from_selected_only
    :   Only include channels relating to selected objects and data

        Type:
        :   boolean, default True

    show_subframe
    :   Display and allow setting fractional frame values for the current frame

        Type:
        :   boolean, default False

    simulation_frame_end
    :   Frame at which simulations end

        Type:
        :   int in [-inf, inf], default 250

    simulation_frame_start
    :   Frame at which simulations start

        Type:
        :   int in [-inf, inf], default 1

    sync_mode
    :   How to sync playback

        - `NONE`
          Play Every Frame – Do not sync, play every frame.
        - `FRAME_DROP`
          Frame Dropping – Drop frames if playback is too slow.
        - `AUDIO_SYNC`
          Sync to Audio – Sync to audio playback, dropping frames.

        Type:
        :   enum in [`'NONE'`, `'FRAME_DROP'`, `'AUDIO_SYNC'`], default `'AUDIO_SYNC'`

    time_jump_delta
    :   Number of frames or seconds to jump forward or backward

        Type:
        :   float in [0.1, inf], default 1.0

    time_jump_unit
    :   Which unit to use for time jumps in the timeline

        - `FRAME`
          Frame – Jump by frames.
        - `SECOND`
          Second – Jump by seconds.

        Type:
        :   enum in [`'FRAME'`, `'SECOND'`], default `'SECOND'`

    timeline_markers
    :   Markers used in all timelines for the current scene

        Type:
        :   [`TimelineMarkers`](bpy.types.TimelineMarkers.html#bpy.types.TimelineMarkers "bpy.types.TimelineMarkers") [`bpy_prop_collection`](bpy.types.bpy_prop_collection.html#bpy.types.bpy_prop_collection "bpy.types.bpy_prop_collection") of [`TimelineMarker`](bpy.types.TimelineMarker.html#bpy.types.TimelineMarker "bpy.types.TimelineMarker"), (readonly)

    tool_settings
    :   Type:
        :   [`ToolSettings`](bpy.types.ToolSettings.html#bpy.types.ToolSettings "bpy.types.ToolSettings"), (readonly, never None)

    transform_orientation_slots
    :   Type:
        :   [`bpy_prop_collection`](bpy.types.bpy_prop_collection.html#bpy.types.bpy_prop_collection "bpy.types.bpy_prop_collection") of [`TransformOrientationSlot`](bpy.types.TransformOrientationSlot.html#bpy.types.TransformOrientationSlot "bpy.types.TransformOrientationSlot"), (readonly)

    unit_settings
    :   Unit editing settings

        Type:
        :   [`UnitSettings`](bpy.types.UnitSettings.html#bpy.types.UnitSettings "bpy.types.UnitSettings"), (readonly, never None)

    use_audio
    :   Play back of audio from Sequence Editor, otherwise mute audio

        Type:
        :   boolean, default False

    use_audio_scrub
    :   Play audio from Sequence Editor while scrubbing

        Type:
        :   boolean, default False

    use_custom_simulation_range
    :   Use a simulation range that is different from the scene range for simulation nodes that don’t override the frame range themselves

        Type:
        :   boolean, default False

    use_gravity
    :   Use global gravity for all dynamics

        Type:
        :   boolean, default True

    use_nodes
    :   Enable the compositing node group.

        removal planned in version 6.0

        Unused but kept for compatibility reasons. Setting the property has no effect, and getting it always returns True. Use #scene.render.use_compositing to turn compositing to enable or disable compositing.

        Type:
        :   boolean, default False

    use_preview_range
    :   Use an alternative start/end frame range for animation playback and view renders

        Type:
        :   boolean, default False

    use_stamp_note
    :   User defined note for the render stamping

        Type:
        :   string, default “”, (never None)

    view_layers
    :   Type:
        :   [`ViewLayers`](bpy.types.ViewLayers.html#bpy.types.ViewLayers "bpy.types.ViewLayers") [`bpy_prop_collection`](bpy.types.bpy_prop_collection.html#bpy.types.bpy_prop_collection "bpy.types.bpy_prop_collection") of [`ViewLayer`](bpy.types.ViewLayer.html#bpy.types.ViewLayer "bpy.types.ViewLayer"), (readonly)

    view_settings
    :   Color management settings applied on image before saving

        Type:
        :   [`ColorManagedViewSettings`](bpy.types.ColorManagedViewSettings.html#bpy.types.ColorManagedViewSettings "bpy.types.ColorManagedViewSettings"), (readonly)

    world
    :   World used for rendering the scene

        Type:
        :   [`World`](bpy.types.World.html#bpy.types.World "bpy.types.World")

    *classmethod* update_render_engine()
    :   Trigger a render engine update

    statistics(*view_layer*)
    :   statistics

        Parameters:
        :   **view_layer** ([`ViewLayer`](bpy.types.ViewLayer.html#bpy.types.ViewLayer "bpy.types.ViewLayer"), (never None)) – View Layer

        Returns:
        :   Statistics

        Return type:
        :   string, (never None)

    frame_set(*frame*, *\**, *subframe=0.0*)
    :   Set scene frame updating all objects and view layers immediately

        Parameters:
        :   - **frame** (*int in* *[**-1048574**,* *1048574**]*) – Frame number to set
            - **subframe** (*float in* *[**0**,* *1**]**,* *(**optional**)*) – Subframe time, between 0.0 and 1.0

    uvedit_aspect(*object*)
    :   Get uv aspect for current object

        Parameters:
        :   **object** ([`Object`](bpy.types.Object.html#bpy.types.Object "bpy.types.Object"), (never None)) – Object

        Returns:
        :   aspect

        Return type:
        :   [`mathutils.Vector`](mathutils.html#mathutils.Vector "mathutils.Vector") of 2 items in [0, inf]

    ray_cast(*depsgraph*, *origin*, *direction*, *\**, *distance=1.70141e+38*)
    :   Cast a ray onto evaluated geometry in world-space

        Parameters:
        :   - **depsgraph** ([`Depsgraph`](bpy.types.Depsgraph.html#bpy.types.Depsgraph "bpy.types.Depsgraph"), (never None)) – The current dependency graph
            - **distance** (*float in* *[**0**,* *inf**]**,* *(**optional**)*) – Maximum distance

        Returns:
        :   `result`, boolean

            `location`, The hit location of this ray cast, [`mathutils.Vector`](mathutils.html#mathutils.Vector "mathutils.Vector") of 3 items in [-inf, inf]

            `normal`, The face normal at the ray cast hit location, [`mathutils.Vector`](mathutils.html#mathutils.Vector "mathutils.Vector") of 3 items in [-inf, inf]

            `index`, The face index, -1 when original data isn’t available, int in [-inf, inf]

            `object`, Ray cast object, [`Object`](bpy.types.Object.html#bpy.types.Object "bpy.types.Object")

            `matrix`, Matrix, [`mathutils.Matrix`](mathutils.html#mathutils.Matrix "mathutils.Matrix") of 4 \* 4 items in [-inf, inf]

        Return type:
        :   (boolean, [`mathutils.Vector`](mathutils.html#mathutils.Vector "mathutils.Vector") of 3 items in [-inf, inf], [`mathutils.Vector`](mathutils.html#mathutils.Vector "mathutils.Vector") of 3 items in [-inf, inf], int in [-inf, inf], [`Object`](bpy.types.Object.html#bpy.types.Object "bpy.types.Object"), [`mathutils.Matrix`](mathutils.html#mathutils.Matrix "mathutils.Matrix") of 4 \* 4 items in [-inf, inf])

    sequence_editor_create()
    :   Ensure sequence editor is valid in this scene

        Returns:
        :   New sequence editor data or nullptr

        Return type:
        :   [`SequenceEditor`](bpy.types.SequenceEditor.html#bpy.types.SequenceEditor "bpy.types.SequenceEditor")

    sequence_editor_clear()
    :   Clear sequence editor in this scene

    *classmethod* bl_rna_get_subclass(*id*, *default=None*, */*)
    :   Parameters:
        :   **id** (*str*) – The RNA type identifier.

        Returns:
        :   The RNA type or default when not found.

        Return type:
        :   [`bpy.types.Struct`](bpy.types.Struct.html#bpy.types.Struct "bpy.types.Struct") subclass

    *classmethod* bl_rna_get_subclass_py(*id*, *default=None*, */*)
    :   Parameters:
        :   **id** (*str*) – The RNA type identifier.

        Returns:
        :   The class or default when not found.

        Return type:
        :   type