-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Timelapse render option #4994
base: maintenance
Are you sure you want to change the base?
Timelapse render option #4994
Conversation
@WisdomCode Just a quick heads-up, I've seen this and am happy to help, but it might take until next week. |
dcc8929
to
d7ba017
Compare
So now that 1.10.0 is out and it also looks like it's a fairly solid release, I finally found the time to take a closer look at this :) First of all, please make sure to run Also, this is an improvement of an existing feature, not a huge change, so I've rebased your changes to target the Now, about your problem, just to make sure, we are talking about this staying going: right? If so, the issue is not I'd suggest to introduce a new method on def _reset_metadata(self):
self._image_number = None
self._in_timelapse = False
self._gcode_file = None
self._file_prefix = None
self._capture_errors = 0
self._capture_success = 0 Then replace all calls to def reset_and_create():
file_prefix = self._file_prefix
gcode_file = self._gcode_file
self._reset_metadata()
render_unrendered_timelapse(
file_prefix,
gcode=gcode_file,
postfix=None if success else "-fail",
fps=self._fps,
) That should take care of things. I'd also suggest to keep the logic whether to render a timelapse or not in one place, preferably Also... what do you think, should we maybe also have a "only render if failed" option? Personally I could see myself using this (I'm not interested in timelapse recordings of all my successful prints, but it can be quite helpful for failed prints). |
I will work on this next week, I got sick unfortunately... While I am not sure I would want such a feature (as one probably sometimes wants to retry immediatly after a failed print with a changed setting or some manual intervention), but its just very easy to add right now so I would put it in so no furher issue arises from that, just having all possible options available from the start. As they are hidden in the drop-down, there is just no disadvantage from a designer standpoint in adding another option for the user I think. 👍 |
Get well soon! |
Edit: Tested all scenarios now, failing and successful prints on both options that are depending on the prints outcome, and a general test of always and never. |
This Request wants to take care of the suprisingly old #1313
It offers a combo box for setting what is to be done with the timelapse after a print is finished. To not break previous setups, the default is to render always after a print. However, it is now also possible to render only successful prints after the print is finished, or to never render a print after finishing printing.
However, I am still not done with this request, because there is a bug I cannot really get my head around. Maybe someone a bit more acquainted can help me out here?
Currently, the render is successfully skipped, however the according print files are still kept as currently active, as if the recording did not stop. This must be due to the timelapse being saved as "current" (the variable in src/octoprint/timelapse.py), but I cannot find where this is happening and how to stop it. A restart of the server fixes it, as the "current" variable gets reinitialized then.
I am also not really sure how to test it without printing, which is just a bit painful for debugging this efficiently.
I would appreciate any help. Thank you for this great project @foosel !