skppy.data_structure.scene_data¶
Scene (named page / saved view) data class.
A separate module is used to avoid naming conflicts with
skppy.data_structure.scene (which contains rendering utilities).
Example
scene = Scene(id=1, name="Scene 1", description="Main view")
print(scene.name, scene.show_in_slideshow)
- class skppy.data_structure.scene_data.PageBackgroundImage[source]
Bases:
objectAn image used as a scene background or match-photo overlay.
- __init__(path: str = '', reference_state: int = 0, image_data: bytes | None = None, width: int = 0, height: int = 0, file_size: int = 0, timestamp: int = 0, visible: bool = False, opacity: float = 1.0, grip_points: list[Vector3D] = <factory>, principal_point_delta: Vector3D = <factory>, radial_distortion_k1: float = 0.0, image_source: int = 0, id: int = 0) None
- class skppy.data_structure.scene_data.Scene[source]
Bases:
objectA SketchUp named scene / page (a saved camera + layer state).
Most scene attributes are stored inside the TAG_SCENES_BLOCK (0x0207) section of model.dat. Unknown sub-payloads are preserved verbatim in
raw_payloadso no information is lost.- Parameters:
id (int) – Persistent scene ID, or a sequential 1-based fallback for records that do not store one.
name (str) – Display name of the scene (e.g.
"Scene 1").description (str, optional) – Optional user description / notes.
flags (int, optional) – Bitmask of scene flags (TAG_SCENE_FLAGS, 0x7149).
hidden_entity_ids (list of int, optional) – Entity IDs hidden in this scene (TAG_SCENE_HIDDEN_ENTITY_IDS, 0x714B).
hidden_layer_ids (list of int, optional) – Layer IDs hidden in this scene (TAG_SCENE_HIDDEN_LAYER_IDS, 0x7150).
active_section_plane_ids (list of int, optional) – Section plane IDs active in this scene (TAG_SCENE_ACTIVE_SECTION_PLANE_IDS, 0x7151).
show_in_slideshow (bool, optional) – Whether the scene is included in slideshow playback (TAG_SCENE_SHOW_IN_SLIDESHOW, 0x7152).
camera (Camera or None, optional) – Saved camera snapshot when the scene stores one.
style_reference (int, optional) – Style reference ID (TAG_SCENE_STYLE_REF, 0x714C).
background_image_ref (int, optional) – Background image reference ID (TAG_SCENE_BACKGROUND_IMAGE_REF, 0x7156).
background_image (PageBackgroundImage or None, optional) – Decoded background/match-photo image when the source stores it inline.
display_background_image (bool, optional) – Whether the image is enabled for this saved scene.
raw_payload (bytes or None, optional) – The full binary payload of the scene record, preserved for future parsing and round-tripping.
Examples
>>> scene = Scene(id=1, name="Scene 1", description="Main view") >>> scene.name 'Scene 1'
- __init__(id: int, name: str, description: str = '', flags: int = 0, hidden_entity_ids: List[int] = <factory>, hidden_layer_ids: List[int] = <factory>, active_section_plane_ids: List[int] = <factory>, show_in_slideshow: bool = True, camera: Camera | None = None, style_reference: int = 0, background_image_ref: int = 0, background_image: PageBackgroundImage | None = None, display_background_image: bool = False, raw_payload: bytes | None = None) None