Skip to content

Add external render progress API and fix C++ build paths#974

Open
azuer88 wants to merge 3 commits intoFormerLurker:masterfrom
azuer88:master
Open

Add external render progress API and fix C++ build paths#974
azuer88 wants to merge 3 commits intoFormerLurker:masterfrom
azuer88:master

Conversation

@azuer88
Copy link
Copy Markdown

@azuer88 azuer88 commented Mar 8, 2026

Summary

  • Add /renderProgress API endpoint — allows external before/after render scripts to push progress updates to the Octolapse progress bar in the OctoPrint UI. Useful for scripts
    that do their own processing (re-encoding, watermarking, masking) and want to drive the UI progress independently. Requires an Application Key to post.
  • Fix setup.py C++ source paths — sources were referencing octoprint_octolapse/*.cpp but files live in octoprint_octolapse/data/lib/c/. Also fixes a bug where . in
    requirements.txt was being passed to install_requires.
  • Add examples/ — usage example for the new API endpoint.

Changes

octoprint_octolapse/__init__.py

  • Add POST /renderProgress Blueprint route accepting {"percent": float}, forwarded to the UI via the existing render progress message system.

octoprint_octolapse/render.py

  • Add get_current_rendering_job() to RenderingProcessor so the progress endpoint can include job info in updates.

setup.py

  • Fix C++ extension sources to use correct octoprint_octolapse/data/lib/c/ paths.
  • Skip . entry when reading requirements.txt into install_requires.

examples/

  • New example scripts demonstrating how to POST progress updates from an external shell or Python script.

Test plan

  • POST /plugin/octolapse/renderProgress with {"percent": 50} returns {"success": true}
  • Progress bar updates in OctoPrint UI when endpoint is called during a render
  • pip install -e . succeeds without errors about missing C++ sources

azuer88 and others added 3 commits March 9, 2026 01:08
- Add /renderProgress endpoint for external scripts to push progress updates
- Add get_current_rendering_job() to RenderingProcessor
- Fix setup.py: skip '.' in requirements, update C++ sources to data/lib/c/
- Add examples/send_render_progress.py usage example
- Add CLAUDE.md project documentation
BlueprintPlugin routes are registered at /plugin/<id>/, not /api/plugin/<id>/.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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