FormerLurker / Octolapse

Stabilized timelapses for Octoprint
GNU Affero General Public License v3.0
639 stars 99 forks source link

[Request] Add G-Code template function before taking picture #698

Open X-Ryl669 opened 3 years ago

X-Ryl669 commented 3 years ago

If this is a feature request describe it here

Currently, it's possible to add a static G-Code command before taking a picture. I'd like to subtly modify the color of the printer's LED strip before taking the picture. In order to do that, I would like to generate a G-Code (M150) command based on a template expression (or better a python function). The input of the function/expression should be the layer height or the current position.

This way, the final rendering could show a nice color gradient or light effect of the part being constructed.

Version of Octolapse

Octolapse Version: 0.4.1

Version of OctoPrint

OctoPrint Version: 0.18.0

FormerLurker commented 3 years ago

There may be a way to do this already via a gcode camera script, but i am not 100% sure if the timing is right. It could also be done with a console script, but that is a bit extreme. Will let you know