Scene Editor¶
Scene Editor Module¶
This module provides the main entry point for scene manipulation through the
SceneEditor class. It orchestrates all editing operations on scenes,
actors, sensors, and the ego vehicle.
The SceneEditor is the central hub that provides:
Access to sub-editors (
EgoEditor,ActorEditor,SensorEditor)Scene-level operations (reset, actor insertion/removal)
Actor manipulation shortcuts
Sensor access and configuration
Modification tracking
In scripts sent to /scene/python_scene_edition, the SceneEditor is
available as the scene variable.
Example
Basic scene manipulation workflow:
# Access via the 'scene' variable in edition scripts
# Edit the ego vehicle
scene.ego.shift(forward=5).rotate(yaw=15)
# Edit an actor
scene.actor(4).displace(forward=10).shift(left=2)
# Edit a sensor
scene.camera("FRONT").shift(up=0.05).rotate(pitch=-2)
# Insert a new actor on ego trajectory
new_id = scene.insert_actor_on_ego_trajectory(4, forward=20, left=1.5)
# Get all modifications
mods = scene.get_modifications()
See also
EgoEditorEgo vehicle editor
ActorEditorIndividual actor editor
SensorEditorSensor editor
TrajectoryEditorLow-level trajectory editor
- class mimic_scene_edition.editors.scene_editor.SceneEditor(scene, *, limited_mode=False, value_limits=None, ego_value_limits=None, scene_actor_value_limits=None, external_actor_value_limits=None)[source]¶
Bases:
objectMain entry point for scene manipulation.
The
SceneEditorprovides a unified interface for editing all aspects of a driving scene, including the ego vehicle, actors (other vehicles, pedestrians, etc.), and sensors (cameras, LiDARs, radars).- Parameters:
scene (Scene) – The scene object to edit.
limited_mode (bool, optional) – If True, enforce value limits on parameters to prevent extreme edits. Default is False.
value_limits (dict[str, tuple[float, float]] or None, optional) – Custom parameter limits as
{param_name: (min, max)}. If None, usesDEFAULT_VALUE_LIMITS.
- Variables:
scene (Scene) – The underlying scene object being edited.
ego (EgoEditor) – Editor for the ego vehicle and attached sensors.
editions (list[EditionDict]) – List of all modifications applied to the scene.
limited_mode (bool) – Whether value limiting is enabled.
value_limits (dict) – Current parameter limits.
Notes
The
SceneEditormaintains a backup of the original scene state, which can be restored usingreset(). All modifications are tracked in theeditionslist for logging and debugging purposes.Actor IDs are preserved across edits. When inserting new actors, unique IDs are automatically assigned.
Examples
Create an editor and perform basic operations:
>>> editor = SceneEditor(scene) >>> editor.ego.shift(forward=5) >>> editor.actor(4).rotate(yaw=90) >>> editor.camera("FRONT").shift(up=0.1)
Use limited mode for safer edits:
>>> editor = SceneEditor(scene, limited_mode=True) >>> editor.ego.shift(forward=100) # May raise if exceeds limits
Chain multiple operations:
>>> scene.ego.shift(forward=5).rotate(yaw=15).stop(at_idx=50)
We keep an original id for each actor that originates in the scene:
>>> actor_0 = scene.actor(0).actor >>> print("ID before replacement:", scene.actor(4).actor.original_id) >>> scene.replace_actor(4, actor_0) >>> print("ID after replacement:", scene.actor(4).actor.original_id)
See also
reset()Restore original scene state
get_modifications()Get list of all edits
as_scene()Get the underlying Scene object
- __init__(scene, *, limited_mode=False, value_limits=None, ego_value_limits=None, scene_actor_value_limits=None, external_actor_value_limits=None)[source]¶
- property editions: list[EditionDict]¶
List of all modifications applied to the scene.
- Returns:
Each entry contains
method,params, anddescriptionkeys documenting an individual edit operation.- Return type:
Examples
>>> scene.ego.shift(forward=5) >>> scene.actor(4).rotate(yaw=90) >>> for edit in scene.editions: ... print(edit['description'])
- property ego: EgoEditor¶
Editor for the ego vehicle.
- Returns:
The ego vehicle editor instance. All sensor positions are relative to the ego, so ego transformations affect the entire sensor rig.
- Return type:
Examples
>>> scene.ego.shift(forward=5, left=2) >>> scene.ego.rotate(yaw=15) >>> scene.ego.stop(at_idx=50, duration=20)
See also
EgoEditorFull ego editor API
- actor(ref)[source]¶
Get an editor for a specific actor.
- Parameters:
ref (int, str or Actor) – Actor ID (int), a name ending in it (
"actor_21"), or an Actor object.- Returns:
Editor instance for the specified actor.
- Return type:
- Raises:
KeyError – If no actor exists with the given ID and none was ever removed under it.
Notes
An id this editor removed resolves to a
RemovedActorEditor:Removedis sticky, so a handle held past the removal still answers, and every op through it is a no-op. An id that was never in the scene still raises.Examples
Access by ID:
>>> scene.actor(4).shift(left=2)
Access by object:
>>> actor_obj = scene.scene.actors[0] >>> scene.actor(actor_obj).rotate(yaw=90)
Method chaining:
>>> scene.actor(4).displace(forward=10).shift(left=2).stop(at_idx=50)
See also
actors()Get editors for all actors
ActorEditorFull actor editor API
- actors()[source]¶
Get editors for all actors in the scene.
- Returns:
List of actor editors, one for each actor.
- Return type:
Examples
Apply same transformation to all actors:
>>> for actor_ed in scene.actors(): ... actor_ed.shift(up=0.1)
Filter and modify specific actors:
>>> for actor_ed in scene.actors(): ... if actor_ed.actor.category == "vehicle": ... actor_ed.speed(multiplier=0.5)
See also
actor()Get editor for a specific actor
actors_by_id()Get actors as ID-indexed mapping
- actors_by_id()[source]¶
Get all actors indexed by their ID.
- Returns:
Dictionary mapping actor IDs to Actor objects.
- Return type:
Mapping[int, Actor]
Examples
>>> actors_map = scene.actors_by_id() >>> actor_4 = actors_map[4] >>> print(f"Actor 4 category: {actor_4.category}")
- camera(ref)[source]¶
Get an editor for a specific camera.
- Parameters:
Camera reference - can be:
int: Camera ID or indexstr: Camera name (e.g., “FRONT”, “FRONT_LEFT”)Camera: Camera object directly
- Returns:
Sensor editor instance for the camera.
- Return type:
- Raises:
KeyError – If no camera matches the reference.
Examples
Access by name:
>>> scene.camera("FRONT").shift(up=0.05)
Access by ID:
>>> scene.camera(0).rotate(pitch=-2)
Method chaining:
>>> scene.camera("FRONT").shift(up=0.05).rotate(pitch=-1).scale_camera_resolution(0.5)
- lidar(ref)[source]¶
Get an editor for a specific LiDAR.
- Parameters:
LiDAR reference - can be:
int: LiDAR ID or indexstr: LiDAR name (e.g., “LIDAR_TOP”)Lidar: Lidar object directly
- Returns:
Sensor editor instance for the LiDAR.
- Return type:
- Raises:
KeyError – If no LiDAR matches the reference.
Examples
>>> scene.lidar("LIDAR_TOP").shift(up=0.1) >>> scene.lidar(0).set_lidar_intrinsics(max_range=150)
- radar(ref)[source]¶
Get an editor for a specific radar.
- Parameters:
Radar reference - can be:
int: Radar ID or indexstr: Radar name (e.g., “RADAR_FRONT”)Radar: Radar object directly
- Returns:
Sensor editor instance for the radar.
- Return type:
- Raises:
KeyError – If no radar matches the reference.
Examples
>>> scene.radar("RADAR_FRONT").set_radar_intrinsics(range=200)
- cameras()[source]¶
Get editors for all cameras in the scene.
- Returns:
List of sensor editors, one for each camera.
- Return type:
Examples
Scale all cameras to half resolution:
>>> for cam in scene.cameras(): ... cam.scale_camera_resolution(0.5)
See also
camera()Get editor for a specific camera
- lidars()[source]¶
Get editors for all LiDARs in the scene.
- Returns:
List of sensor editors, one for each LiDAR.
- Return type:
Examples
>>> for lidar in scene.lidars(): ... lidar.set_lidar_intrinsics(max_range=200)
See also
lidar()Get editor for a specific LiDAR
- radars()[source]¶
Get editors for all radars in the scene.
- Returns:
List of sensor editors, one for each radar.
- Return type:
Examples
>>> for radar in scene.radars(): ... radar.set_radar_intrinsics(azimuth_fov=2.0)
See also
radar()Get editor for a specific radar
- switch_limited_mode(limited_mode, new_limits_or_self=None, *, ego_value_limits=None, scene_actor_value_limits=None, external_actor_value_limits=None)[source]¶
Enable or disable limited mode and optionally update limits.
- Parameters:
limited_mode (bool) – Whether to enable value limiting.
new_limits_or_self (dict or None, optional) – Legacy: single limits dict applied to all categories. If None, keeps existing limits.
ego_value_limits (dict or None, optional) – New ego limits. If None, keeps existing ego limits.
scene_actor_value_limits (dict or None, optional) – New scene-actor limits. If None, keeps existing.
external_actor_value_limits (dict or None, optional) – New external-actor limits. If None, keeps existing.
- Returns:
Self for method chaining.
- Return type:
Examples
Enable limited mode:
>>> scene.switch_limited_mode(True)
Enable with custom limits:
>>> custom_limits = {'forward': (0, 50), 'yaw': (-45, 45)} >>> scene.switch_limited_mode(True, custom_limits)
Disable limited mode:
>>> scene.switch_limited_mode(False)
- reset()[source]¶
Reset the scene to its original state.
Undoes all modifications and clears the editions list. The scene is restored to the state it was in when the
SceneEditorwas created.- Returns:
Self for method chaining.
- Return type:
Examples
>>> scene.ego.shift(forward=100) >>> scene.actor(4).rotate(yaw=180) >>> # Undo all changes >>> scene.reset() >>> len(scene.editions) 0
- recompute_all_sensor_world_poses()[source]¶
Recompute world poses for all sensors.
Updates the world trajectory for all cameras, LiDARs, and radars based on current ego trajectory and sensor extrinsics. Call this after modifying ego trajectory or sensor extrinsics to ensure consistency.
The world pose is computed as:
S2W(t) = E2W(t) @ S2E
Where:
S2W: Sensor-to-world transform (the result)E2W: Ego-to-world transform (interpolated to sensor timestamps)S2E: Sensor-to-ego extrinsics
- Returns:
Self for method chaining.
- Return type:
Examples
>>> scene.ego.shift(forward=10) >>> scene.recompute_all_sensor_world_poses()
See also
SensorEditor.recompute_world_poses()Recompute for individual sensor
- convert_camera_convention(ref, *, from_convention, to_convention='vehicle')[source]¶
Convert a camera’s extrinsics between coordinate conventions.
This is a convenience wrapper that converts convention and recomputes world poses in a single call.
- Parameters:
- Returns:
Self for method chaining.
- Return type:
Notes
Convention definitions:
Vehicle: X-forward, Y-left, Z-up
OpenCV: X-right, Y-down, Z-forward
Examples
>>> scene.convert_camera_convention("FRONT", from_convention="opencv")
See also
SensorEditor.convert_convention()Full convention conversion API
- normalize_camera_conventions(to)[source]¶
Normalize all camera extrinsics to a consistent convention.
- Parameters:
to (str) – Target convention for all cameras:
"vehicle"or"opencv".- Returns:
Self for method chaining.
- Return type:
Examples
Convert all cameras to vehicle convention:
>>> scene.normalize_camera_conventions(to="vehicle")
See also
EgoEditor.normalize_camera_conventions()Underlying implementation
- scale_camera(ref, scale=1.0)[source]¶
Scale a camera’s resolution.
Adjusts both the image dimensions and intrinsic parameters (focal length, principal point) proportionally.
- Parameters:
- Returns:
Self for method chaining.
- Return type:
Examples
>>> scene.scale_camera("FRONT", scale=0.5) # Half resolution >>> scene.scale_camera("FRONT", scale=2.0) # Double resolution
See also
SensorEditor.scale_camera_resolution()Full scaling API
- insert_actor(actor, *, lidar_source=-1)[source]¶
Insert an actor into the scene.
The actor is deep-copied and assigned a new unique ID.
- Parameters:
actor (Actor) – The actor to insert.
lidar_source (int, optional) – ID of another actor to use as the lidar source for this actor.
-1means the source is selected automatically at runtime. Default is-1.
- Returns:
The ID assigned to the newly inserted actor.
- Return type:
Examples
>>> new_actor = existing_actor.model_copy(deep=True) >>> new_id = scene.insert_actor(new_actor) >>> scene.actor(new_id).shift(forward=10)
See also
insert_actor_on_ego_trajectory()Insert relative to ego
insert_static_actor()Insert a stationary actor
duplicate_actor()Duplicate an existing actor
- remove_actor(actor_id)[source]¶
Remove an actor from the scene.
- Parameters:
actor_id (int or str) – ID of the actor to remove, or a name ending in it.
- Returns:
The removed actor object.
- Return type:
Actor
- Raises:
KeyError – If no actor exists with the given ID.
Examples
>>> removed = scene.remove_actor(4) >>> print(f"Removed actor: {removed.category}")
The id may also be written as the name that carries it:
>>> removed = scene.remove_actor("actor_4")
- remove_all_actors()[source]¶
Remove all actors from the scene.
- Returns:
List of all removed actors.
- Return type:
list[Actor]
Examples
>>> removed_actors = scene.remove_all_actors() >>> print(f"Removed {len(removed_actors)} actors")
- duplicate_actor(actor_id, *, forward=0.0, backward=0.0, left=0.0, right=0.0)[source]¶
Duplicate an actor with optional displacement.
Creates a deep copy of the actor and optionally displaces it along its trajectory path and/or laterally.
- Parameters:
actor_id (int or Actor) – Actor to duplicate (ID or object).
forward (float, optional) – Distance to displace forward along the path (meters). Default is 0.0.
backward (float, optional) – Distance to displace backward along the path (meters). Default is 0.0.
left (float, optional) – Lateral shift to the left (meters). Default is 0.0.
right (float, optional) – Lateral shift to the right (meters). Default is 0.0.
- Returns:
ID of the newly created actor.
- Return type:
Examples
Simple duplication:
>>> new_id = scene.duplicate_actor(4)
Duplicate 20m ahead:
>>> new_id = scene.duplicate_actor(4, forward=20)
Duplicate in adjacent lane:
>>> new_id = scene.duplicate_actor(4, left=3.5)
Combined displacement:
>>> new_id = scene.duplicate_actor(4, forward=30, left=3.5)
See also
ActorEditor.duplicate()Actor-level duplication
insert_actor()Insert a new actor
- replace_actor(actor_id, new_actor)[source]¶
Replace an actor with a different actor.
The new actor inherits the old actor’s trajectory, with Z-offset adjusted for different heights.
- Parameters:
actor_id (int) – ID of the actor to replace.
new_actor (Actor) – The replacement actor.
- Returns:
Self for method chaining.
- Return type:
Notes
The Z position is automatically adjusted based on the height difference between the old and new actors to maintain ground contact.
Examples
>>> # Replace a vehicle with a truck >>> scene.replace_actor(4, truck_actor)
- swap_actors(a_idx, b_idx)[source]¶
Swap the positions of two actors.
Each actor takes the other’s trajectory, with Z-offsets adjusted for different heights.
- Parameters:
- Returns:
Self for method chaining.
- Return type:
Examples
>>> scene.swap_actors(0, 1)
- offset_actor(actor_id, *, offset_frame)[source]¶
Shift an actor’s timeline by a number of frames.
This is a convenience wrapper around
ActorEditor.offset_frames().- Parameters:
- Returns:
Self for method chaining.
- Return type:
Examples
>>> scene.offset_actor(4, offset_frame=10)
See also
ActorEditor.offset_frames()Underlying implementation
- insert_actor_on_different_actor_trajectory(actor_id, reference_actor_id, *, forward=0.0, backward=0.0, left=0.0, right=0.0, meters_behind=0.0)[source]¶
Insert an actor positioned relative to another actor’s trajectory.
The new actor follows the reference actor’s path with optional offsets.
- Parameters:
actor_id (int or Actor) – Actor to insert (ID or object). This actor’s appearance/category is used, but trajectory comes from the reference.
reference_actor_id (int) – ID of the actor whose trajectory to follow.
forward (float, optional) – Arc-length displacement forward along path (meters). Default is 0.0.
backward (float, optional) – Arc-length displacement backward along path (meters). Default is 0.0.
left (float, optional) – Lateral shift to the left (meters). Default is 0.0.
right (float, optional) – Lateral shift to the right (meters). Default is 0.0.
meters_behind (float, optional) – World-space offset behind the reference (meters). This differs from
backwardin that it’s applied in world coordinates at the trajectory midpoint. Default is 0.0.
- Returns:
ID of the newly inserted actor.
- Return type:
Examples
Insert a vehicle following another vehicle:
>>> new_id = scene.insert_actor_on_different_actor_trajectory( ... 4, # source actor ... 5, # reference actor to follow ... forward=10, ... left=3.5 ... )
See also
insert_actor_on_ego_trajectory()Insert relative to ego
duplicate_actor()Duplicate along own trajectory
- insert_actor_on_ego_trajectory(actor_id, *, forward=0.0, backward=0.0, left=0.0, right=0.0, lidar_source=-1)[source]¶
Insert an actor positioned relative to the ego vehicle’s trajectory.
The new actor follows the ego’s path with optional longitudinal and lateral offsets. This is useful for placing vehicles ahead of or behind the ego in the same or adjacent lanes.
- Parameters:
actor_id (int or Actor) – Actor to insert (ID or object).
forward (float, optional) – Distance to move forward along the ego’s trajectory (meters). Default is 0.0.
backward (float, optional) – Distance to move backward along the ego’s trajectory (meters). Default is 0.0.
left (float, optional) – Lateral shift to the left (meters). Default is 0.0.
right (float, optional) – Lateral shift to the right (meters). Default is 0.0.
lidar_source (int, optional) – ID of another actor to use as the lidar source for this actor.
-1means the source is selected automatically at runtime. Default is-1.
- Returns:
ID of the newly inserted actor.
- Return type:
Notes
The Z position is automatically adjusted based on the actor’s height to place its bottom at the ego’s ground level.
Examples
Place actor 20m ahead of ego:
>>> new_id = scene.insert_actor_on_ego_trajectory(4, forward=20)
Place actor in adjacent lane:
>>> new_id = scene.insert_actor_on_ego_trajectory(4, forward=20, left=3.5)
Place actor behind ego:
>>> new_id = scene.insert_actor_on_ego_trajectory(4, backward=15)
See also
insert_static_actor()Insert a stationary actor
insert_and_stop_actor_on_ego_trajectory()Insert and immediately stop
- insert_static_actor(actor_id, *, at_idx=0, forward=0.0, backward=0.0, left=0.0, right=0.0, up=0.0, down=0.0, yaw=0.0, use_ego_timegrid=True, ground=True, lidar_source=-1)[source]¶
Insert a static (non-moving) actor at a position relative to ego.
The actor is placed at a fixed world pose derived from the ego’s pose at a specific frame index, then offset by the specified amounts.
- Parameters:
actor_id (int or Actor) – Actor to insert (ID or object).
at_idx (int, optional) – Frame index on ego trajectory for reference position. Default is 0.
forward (float, optional) – Forward offset from ego position (meters). Default is 0.0.
backward (float, optional) – Backward offset from ego position (meters). Default is 0.0.
left (float, optional) – Leftward offset from ego position (meters). Default is 0.0.
right (float, optional) – Rightward offset from ego position (meters). Default is 0.0.
up (float, optional) – Upward offset (meters). Default is 0.0.
down (float, optional) – Downward offset (meters). Default is 0.0.
yaw (float, optional) – Rotation around Z-axis relative to ego heading (degrees). Default is 0.0.
use_ego_timegrid (bool, optional) – If True, use ego’s timestamps for the static trajectory. Default is True.
ground (bool, optional) – If True, adjust Z to place actor on ground (uses ego’s Z as reference). Default is True.
lidar_source (int, optional) – ID of another actor to use as the lidar source for this actor.
-1means the source is selected automatically at runtime. Default is-1.
- Returns:
ID of the newly inserted actor.
- Return type:
Notes
The actor’s trajectory will be constant (same pose at all timestamps). The
at_idxparameter determines which frame of the ego trajectory to use as the spatial reference for positioning.Examples
Place a parked car 10m ahead:
>>> new_id = scene.insert_static_actor(4, forward=10)
Place a pedestrian on the sidewalk:
>>> new_id = scene.insert_static_actor(pedestrian_id, forward=15, left=5)
Place actor facing perpendicular to ego:
>>> new_id = scene.insert_static_actor(4, forward=10, yaw=90)
See also
insert_actor_on_ego_trajectory()Insert a moving actor
crossing()Insert a crossing pedestrian
- crossing(actor, *, start, end, forward=8.0, lateral=0.0, direction='right_to_left', speed=2.0, ground=True, graceful_stop=False)[source]¶
Insert an actor that crosses perpendicular to the ego’s path.
Creates a crossing scenario (e.g., pedestrian crossing the road) where the actor moves perpendicular to the ego’s direction of travel.
- Parameters:
actor (int or Actor) – Actor to insert (typically a pedestrian).
start (int) – Frame index when the crossing starts.
end (int) – Frame index when the crossing ends.
forward (float, optional) – Distance ahead of ego at spawn time (meters). Default is 8.0.
lateral (float, optional) – Lateral offset from ego centerline at spawn (meters). Positive = left, negative = right. Default is 0.0.
direction (str, optional) – Crossing direction:
"right_to_left"or"left_to_right". Default is"right_to_left".speed (float, optional) – Crossing speed in m/s. Default is 2.0.
ground (bool, optional) – If True, place actor on ground level. Default is True.
graceful_stop (bool, optional) – If True, apply gradual deceleration at end. Default is False.
- Returns:
ID of the newly inserted crossing actor.
- Return type:
Notes
The actor’s local +X axis is aligned with the crossing direction, meaning the actor faces the direction it’s walking.
Examples
Basic pedestrian crossing:
>>> new_id = scene.crossing( ... pedestrian_id, ... start=20, ... end=60, ... forward=15, ... direction="right_to_left" ... )
Slow-walking pedestrian:
>>> new_id = scene.crossing( ... pedestrian_id, ... start=30, ... end=80, ... forward=10, ... speed=1.0 ... )
Crossing from the left side:
>>> new_id = scene.crossing( ... pedestrian_id, ... start=20, ... end=50, ... forward=12, ... lateral=5, ... direction="left_to_right" ... )
See also
insert_static_actor()Insert a stationary actor
insert_actor_on_ego_trajectory()Insert actor on ego path
- insert_and_stop_actor_on_ego_trajectory(actor_ref, *, forward=0.0, backward=0.0, left=0.0, right=0.0, start_idx=0)[source]¶
Insert an actor on the ego trajectory and immediately stop it.
This is a convenience method that combines
insert_actor_on_ego_trajectory()andActorEditor.stop()into a single call.- Parameters:
actor_ref (int or Actor) – Actor to insert (ID or object).
forward (float, optional) – Forward offset along ego trajectory (meters). Default is 0.0.
backward (float, optional) – Backward offset along ego trajectory (meters). Default is 0.0.
left (float, optional) – Lateral offset to the left (meters). Default is 0.0.
right (float, optional) – Lateral offset to the right (meters). Default is 0.0.
start_idx (int, optional) – Frame index at which the actor stops. Default is 0.
- Returns:
ID of the newly inserted actor.
- Return type:
Examples
Insert a stopped vehicle ahead:
>>> new_id = scene.insert_and_stop_actor_on_ego_trajectory( ... 4, ... forward=30, ... start_idx=0 ... )
See also
insert_actor_on_ego_trajectory()Insert without stopping
insert_static_actor()Insert a purely static actor
- rotate_actor(actor_id, *, roll=0.0, pitch=0.0, yaw=0.0)[source]¶
Rotate an actor using Euler angles.
This is a convenience wrapper around
ActorEditor.rotate().- Parameters:
- Returns:
Self for method chaining.
- Return type:
Examples
>>> scene.rotate_actor(4, yaw=90) # Turn actor 90° left
See also
ActorEditor.rotate()Full rotation API
transform_actor()Combined translation and rotation
- transform_actor(actor_id, **xyz_rpy)[source]¶
Transform an actor with translation and rotation.
This is a convenience wrapper around
ActorEditor.transform().- Parameters:
- Returns:
Self for method chaining.
- Return type:
Examples
>>> scene.transform_actor(4, forward=5, left=2, yaw=15)
See also
ActorEditor.transform()Full transformation API
rotate_actor()Rotation only
- object_appearance(enabled)[source]¶
Enable or disable the AutoSplat per-frame appearance residual for every actor.
The appearance residual carries each actor’s dynamic, per-frame look (brake lights, blinkers, and other view-dependent overlays). Muting it renders every actor with its static baseline appearance only.
This toggle only takes visible effect inside the rendering pipeline, which installs a callback via
scene._object_appearance_sink. In a pure offline editor the call is still recorded ineditionsbut is otherwise a no-op.- Parameters:
enabled (bool) –
Trueto render the per-frame appearance residual for all actors,Falseto mute it everywhere.- Returns:
Self for method chaining.
- Return type:
Examples
>>> scene.object_appearance(False) # mute all actors >>> scene.actor(28).object_appearance(True) # re-enable one
See also
ActorEditor.object_appearanceToggle a single actor.
- get_modifications()[source]¶
Get a list of all modifications applied to the scene.
- Returns:
List of edition dictionaries, each containing:
method: Name of the method calledparams: Dictionary of parameters passeddescription: Human-readable description of the edit
- Return type:
Examples
>>> scene.ego.shift(forward=5) >>> scene.actor(4).rotate(yaw=90) >>> mods = scene.get_modifications() >>> for mod in mods: ... print(mod['description'])
See also
editionsDirect access to the editions list