Skip to content

Comments

skp2blend - a CLI tool which runs on linux and converts .skp files to .blend and/or .obj#6

Open
recraft-ou wants to merge 5 commits intoRedHaloStudio:masterfrom
recraft-ou:skp2blend
Open

skp2blend - a CLI tool which runs on linux and converts .skp files to .blend and/or .obj#6
recraft-ou wants to merge 5 commits intoRedHaloStudio:masterfrom
recraft-ou:skp2blend

Conversation

@recraft-ou
Copy link

Convert SketchUp .skp files to Blender .blend (and optionally Wavefront .obj) on Linux amd64 — no SketchUp installation required.

The SketchUp C SDK and its Python bindings (sketchup.pyd) are not available for linux. This makes batch-converting .skp files on Linux servers or CI pipelines impossible without a Windows machine.

skp2blend solves this by packaging everything into a single Docker image:

  • Wine runs the Windows Python interpreter and SketchUp SDK to read .skp files
  • Blender headless builds the .blend output with full material, texture, camera, and hierarchy support
  • Pure-Python OBJ export provides a lightweight alternative output format with no Blender dependency

The result is a self-contained CLI tool that runs on any Linux amd64 host with Docker or Podman.

Add obj_builder.py as a pure-Python OBJ+MTL writer that reads
the same intermediate.json as blend_builder.py, flattening the
entity tree into world-space geometry with Z-up to Y-up
coordinate conversion for OBJ convention.

New CLI flags --also-obj and --obj-only control whether OBJ
output is produced alongside or instead of .blend output.
convert.sh passes these flags through to the Docker container.

Add GitHub Actions workflow to build and push the skp2blend
Docker image to ghcr.io.
Hidden SketchUp tags/layers are no longer dropped during conversion.
Instead, their geometry is placed into per-tag Blender collections
(named "Hidden Tag: <tag>") that are excluded from the view layer —
present in the file but hidden by default.

Also adds a --preview flag that renders a 1920x1080 PNG alongside
the .blend output, and removes the default Blender cube/camera/light
objects that were leaking into output files.
…ert.sh

obj_builder.py no longer drops hidden-tag geometry — all entities are
included in the OBJ output regardless of scene layer visibility (OBJ
has no concept of collection exclusion).

blend_builder.py gains sub-collections for top-level groups and skips
empty groups with no geometry in their subtree.

convert.sh now passes through all --flags to the Docker container
instead of only --also-obj and --obj-only.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant