Scene(ID)¶
base classes — bpy_struct, 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:
- annotation¶
Data-block used for annotations in the 3D view
- Type:
- audio_distance_model¶
Distance model for distance attenuation calculation (default
'INVERSE_CLAMPED')NONENone – No distance attenuation.INVERSEInverse – Inverse distance model.INVERSE_CLAMPEDInverse Clamped – Inverse distance model with clamping.LINEARLinear – Linear distance model.LINEAR_CLAMPEDLinear Clamped – Linear distance model with clamping.EXPONENTExponential – Exponential distance model.EXPONENT_CLAMPEDExponential Clamped – Exponential distance model with clamping.
- Type:
Literal[‘NONE’, ‘INVERSE’, ‘INVERSE_CLAMPED’, ‘LINEAR’, ‘LINEAR_CLAMPED’, ‘EXPONENT’, ‘EXPONENT_CLAMPED’]
- audio_doppler_factor¶
Pitch factor for Doppler effect calculation (in [0, inf], default 1.0)
- Type:
float
- audio_doppler_speed¶
Speed of sound for Doppler effect calculation (in [0.01, inf], default 343.3)
- Type:
float
- audio_volume¶
Audio volume (in [0, 100], default 1.0)
- Type:
float
- collection¶
Scene root collection that owns all the objects and other collections instantiated in the scene (readonly, never None)
- Type:
- cursor¶
(readonly, never None)
- Type:
- cycles¶
Cycles render settings (readonly)
- Type:
CyclesRenderSettings
- cycles_curves¶
Cycles curves rendering settings (readonly)
- Type:
CyclesCurveRenderSettings
- display¶
Scene display settings for 3D viewport (readonly)
- Type:
- display_settings¶
Settings of device saved image would be displayed on (readonly)
- eevee¶
EEVEE settings for the scene (readonly)
- Type:
- frame_current¶
Current frame, to update animation data from Python frame_set() instead (in [-1048574, 1048574], default 1)
- Type:
int
- frame_current_final¶
Current frame with subframe and time remapping applied (in [-1.04857e+06, 1.04857e+06], default 0.0, readonly)
- Type:
float
- frame_end¶
Final frame of the playback/rendering range (in [0, 1048574], default 250)
- Type:
int
- frame_float¶
(in [-1.04857e+06, 1.04857e+06], default 0.0)
- Type:
float
- frame_preview_end¶
Alternative end frame for UI playback (in [-inf, inf], default 0)
- Type:
int
- frame_preview_start¶
Alternative start frame for UI playback (in [-inf, inf], default 0)
- Type:
int
- frame_start¶
First frame of the playback/rendering range (in [0, 1048574], default 1)
- Type:
int
- frame_step¶
Number of frames to skip forward while rendering/playing back each frame (in [0, 1048574], default 1)
- Type:
int
- frame_subframe¶
(in [0, 1], default 0.0)
- Type:
float
- gravity¶
Constant acceleration in a given direction (array of 3 items, in [-inf, inf], default (0.0, 0.0, -9.81))
- Type:
- grease_pencil_settings¶
Grease Pencil settings for the scene (readonly)
- Type:
- hydra¶
Hydra settings for the scene (readonly)
- Type:
- is_nla_tweakmode¶
Whether there is any action referenced by NLA being edited (strictly read-only) (default False, readonly)
- Type:
bool
- keying_sets¶
Absolute Keying Sets for this Scene (default None, readonly)
- Type:
- keying_sets_all¶
All Keying Sets available for use (Builtins and Absolute Keying Sets for this Scene) (default None, readonly)
- Type:
- lock_frame_selection_to_range¶
Don’t allow frame to be selected with mouse outside of frame range (default False)
- Type:
bool
- objects¶
(default None, readonly)
- Type:
- render¶
(readonly, never None)
- Type:
- rigidbody_world¶
(readonly)
- Type:
- safe_areas¶
(readonly, never None)
- Type:
- sequence_editor¶
(readonly)
- Type:
- sequencer_colorspace_settings¶
Settings of color space sequencer is working in (readonly)
- show_keys_from_selected_only¶
Only include channels relating to selected objects and data (default True)
- Type:
bool
- show_subframe¶
Display and allow setting fractional frame values for the current frame (default False)
- Type:
bool
- simulation_frame_end¶
Frame at which simulations end (in [-inf, inf], default 250)
- Type:
int
- simulation_frame_start¶
Frame at which simulations start (in [-inf, inf], default 1)
- Type:
int
- sync_mode¶
How to sync playback (default
'AUDIO_SYNC')NONEPlay Every Frame – Do not sync, play every frame.FRAME_DROPFrame Dropping – Drop frames if playback is too slow.AUDIO_SYNCSync to Audio – Sync to audio playback, dropping frames.
- Type:
Literal[‘NONE’, ‘FRAME_DROP’, ‘AUDIO_SYNC’]
- time_jump_delta¶
Number of frames or seconds to jump forward or backward (in [0.1, inf], default 1.0)
- Type:
float
- time_jump_unit¶
Which unit to use for time jumps in the timeline (default
'SECOND')FRAMEFrame – Jump by frames.SECONDSecond – Jump by seconds.
- Type:
Literal[‘FRAME’, ‘SECOND’]
- timeline_markers¶
Markers used in all timelines for the current scene (default None, readonly)
- Type:
- tool_settings¶
(readonly, never None)
- Type:
- transform_orientation_slots¶
(default None, readonly)
- unit_settings¶
Unit editing settings (readonly, never None)
- Type:
- use_audio¶
Play back of audio from Sequence Editor, otherwise mute audio (default False)
- Type:
bool
- use_audio_scrub¶
Play audio from Sequence Editor while scrubbing (default False)
- Type:
bool
- 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 (default False)
- Type:
bool
- use_gravity¶
Use global gravity for all dynamics (default True)
- Type:
bool
- use_nodes¶
Enable the compositing node group. (default False)
Deprecated since version 5.0: 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:
bool
- use_preview_range¶
Use an alternative start/end frame range for animation playback and view renders (default False)
- Type:
bool
- use_stamp_note¶
User defined note for the render stamping (default “”, never None)
- Type:
str
- view_layers¶
(default None, readonly)
- Type:
- view_settings¶
Color management settings applied on image before saving (readonly)
- Type:
- classmethod update_render_engine()¶
Trigger a render engine update
- statistics(view_layer)¶
statistics
- Parameters:
view_layer (
ViewLayer) – View Layer, (never None)- Returns:
Statistics, (never None)
- Return type:
str
- frame_set(frame, *, subframe=0.0)¶
Set scene frame updating all objects and view layers immediately
- Parameters:
frame (int) – Frame number to set (in [-1048574, 1048574])
subframe (float) – Subframe time, between 0.0 and 1.0 (in [0, 1], optional)
- uvedit_aspect(object)¶
Get uv aspect for current object
- Parameters:
object (
Object) – Object (never None)- Returns:
aspect (array of 2 items, in [0, inf])
- Return type:
- ray_cast(depsgraph, origin, direction, *, distance=1.70141e+38)¶
Cast a ray onto evaluated geometry in world-space
- Parameters:
depsgraph (
Depsgraph) – The current dependency graph (never None)origin (
mathutils.Vector) – (array of 3 items, in [-inf, inf])direction (
mathutils.Vector) – (array of 3 items, in [-inf, inf])distance (float) – Maximum distance (in [0, inf], optional)
- Returns:
result, boollocation, The hit location of this ray cast,mathutils.Vectornormal, The face normal at the ray cast hit location,mathutils.Vectorindex, The face index, -1 when original data isn’t available, intobject, The original (un-evaluated) object that was hit. Note thatlocation,normal, andindexcorrespond to the evaluated object’s mesh.,Objectmatrix, Matrix,mathutils.Matrix- Return type:
tuple[bool,
mathutils.Vector,mathutils.Vector, int,Object,mathutils.Matrix]
- sequence_editor_create()¶
Ensure sequence editor is valid in this scene
- Returns:
New sequence editor data or None
- Return type:
- sequence_editor_clear()¶
Clear sequence editor in this scene
- classmethod bl_rna_get_subclass(id, default=None, /)¶
- Parameters:
id (str) – The RNA type identifier.
default (
bpy.types.Struct| None) – The value to return when not found.
- Returns:
The RNA type or default when not found.
- Return type:
- classmethod bl_rna_get_subclass_py(id, default=None, /)¶
- Parameters:
id (str) – The RNA type identifier.
default (type | None) – The value to return when not found.
- Returns:
The class or default when not found.
- Return type:
type
Inherited Properties¶
Inherited Functions¶
References¶
|