bundle.recon3d.stages.blender.base

Blender stage — base class and I/O contracts.

Takes a GaussiansOutput (PLY path) and produces a .blend file via a headless Blender run. The stage is optional: it only participates in the pipeline when Blender is discoverable on the host.

Blender-side logic lives in scripts/ as standalone .py files loaded via --python. Parameters are passed as a JSON sidecar; no string interpolation on the host side.

Extending

Subclass BlenderStage, set script_name to a script in scripts/, and override _build_params to supply the script’s expected keys:

class BlenderTurntableStage(BlenderStage):
    name: str = "blender_turntable"
    script_name: str = "render_turntable"

    def _build_params(self, inp, render_dir):
        return {"blend_path": str(inp.blend_path), "frames": inp.frames, ...}

Attributes

log

Classes

BlenderInput

Input contract for the Blender import stage.

BlenderOutput

Output contract from the Blender import stage.

BlenderStage

Imports a 3DGS PLY into Blender headless and saves a .blend file.

Functions

create_blender_stage() → BlenderStage

Module Contents

bundle.recon3d.stages.blender.base.log
class bundle.recon3d.stages.blender.base.BlenderInput(/, **data: Any)[source]

Bases: bundle.core.data.Data

Input contract for the Blender import stage.

gaussians_output: bundle.recon3d.stages.gaussians.base.GaussiansOutput
blend_output: pathlib.Path
render: bool = False
engine: Literal['EEVEE', 'CYCLES'] = 'EEVEE'
render_dir: pathlib.Path | None = None
class bundle.recon3d.stages.blender.base.BlenderOutput(/, **data: Any)[source]

Bases: bundle.core.data.Data

Output contract from the Blender import stage.

blend_path: pathlib.Path
render_dir: pathlib.Path | None = None
validate_exists() → bool[source]
class bundle.recon3d.stages.blender.base.BlenderStage(/, **data: Any)[source]

Bases: bundle.recon3d.stages.base.Stage

Imports a 3DGS PLY into Blender headless and saves a .blend file.

Subclasses override script_name and _build_params to drive a different Blender script without touching the run machinery.

name: str = 'blender'
script_name: str = 'ply_to_blend'
async check_deps() → bool[source]

Return True if a usable Blender installation is discoverable.

async run(input: bundle.core.data.Data) → bundle.core.data.Data[source]

Execute the stage and return the output contract.

bundle.recon3d.stages.blender.base.create_blender_stage() → BlenderStage[source]