Ops#
plupy.ops: editing operations; object holds the ones on scene uses.
class OpsUsage and examples
Members: object · scene_tunnel_exits · connect_scene_tunnel · set_cursor_mode · bake_navigation
object#
object = ObjectOps()A class attribute shared by every instance.
scene_tunnel_exits#
scene_tunnel_exits(entry: Use) -> tuple[Use, ...]Return valid placed exits for a Scene Tunnel entry, without loading gameplay or visual assets.
Filters out inactive, 2D, scaled or sheared anchors (including parent transforms), uses of the entry's shared object data, and existing Scene Tunnels with incompatible rectangle sizes. Results carry their scene IDs and can be passed directly to connect_scene_tunnel.
connect_scene_tunnel#
connect_scene_tunnel(entry: Use, exit: Use | None=None, *, scene: Scene | None=None, name: str='Scene Tunnel Exit', width: float | None=None, height: float | None=None) -> UseCreate or connect a Scene Tunnel in one Undo step; return its exit use.
Pass exit to connect an existing placed 3D object, or scene to create a named empty 3D exit at that scene's origin. Move the returned use with its transform afterward if needed. Width and height are metres, defaulting to the entry's existing size or 3 by 4 metres. Both anchors must be active and rigid. Existing exit Scene Tunnels must match the size. The entry's object data stays shared: every use receives the component and connection. Driven fields, variants and inherited components require editing their source instead. The engine supplies the reverse connection; no exit component or setup Script is needed. Works inside plupy.edit; a failure rolls the whole group back.
Example: exit = plupy.ops.connect_scene_tunnel(entry, scene=interior, name="Room Exit")
set_cursor_mode#
set_cursor_mode(mode: str) -> NoneSet the project's Play cursor mode, Free or Captured, in an undoable edit. Captured hides/confines the pointer after clicking Play; Escape releases it. Call outside plupy.edit; settings have their own Undo step. Does not change the current editor pointer immediately.
bake_navigation#
bake_navigation(*, scene=None) -> dictBake static 3D navigation for a scene; defaults to the context scene.
Creates default navigation settings when absent, in one undoable edit. The derived cache is not undoable. Call outside plupy.edit, with Play stopped. Returns polygon/triangle counts and milliseconds; invalid geometry or settings fail without replacing a good bake.
Related types#
ObjectOps · Scene · Use · edit
Source#
- _live.py:2220