FormerLurker / Octolapse

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

[Request] Add a choice to run the "Before Render Script" even if Rendering is set to Disabled #899

Closed dssamusaran closed 1 year ago

dssamusaran commented 1 year ago

If this is a feature request describe it here

When the Rendering is set to 'Disabled' we should be able to still run at least the 'Before Render Script'.

When using the 'Deferred Download' documentation (See here), the pictures are downloaded from the DSLR through the 'Before Render Script'.

It works fine in most cases but if you set the Rendering to 'Disabled' the script is not ran at all and you end up with a .zip file without the snapshots and containing only the folder structure, metadatas and such.

I also tried putting the deferred download script in the 'After Print End Script' section but it does not work either. It looks like the empty .zip is already created before this section is ran.

Maybe a setting in the Rendering Profile, Timelapse Generation part letting us untick Enabled and having a second box "Still run scripts while disabled" could be a way to implement this.

This would be useful for people doing the rendering in external softwares.

Version of Octolapse

Octolapse Version: v0.4.2

Version of OctoPrint

OctoPrint Version: 1.8.7

When you ran into the problem, did you have diagnostic logging enabled?

Diagnostic Logging was Enabled: _REPLACE_THISYES_OR_NO

What were you doing when the problem occurred

  1. _REPLACE_THISSTEP_ONE_GOES_HERE
  2. _REPLACE_THISSTEP_TWO_GOES_HERE
  3. _REPLACE_THISSTEP_...

What should have happened?

_REPLACE_THISPUT_YOUR_DESCRIPTION_HERE

What happened instead?

_REPLACE_THISPUT_YOUR_DESCRIPTION_HERE

Operating System running OctoPrint and Octolapse

OS Name: _REPLACE_THISOS_NAME_GOES_HERE Os Version: _REPLACE_THISOS_VERSION_GOES_HERE

Printer model & used firmware incl. version

Printer Model: _REPLACE_THISPRINTER_MODEL_GOES_HERE Printer Firmware Version: _REPLACE_THISPRINTER_FIRMWARE_VERSION_GOES_HERE

Browser and version of browser, operating system running browser

Browser: _REPLACE_THISBROWSER_VERSION_GOES_HERE Browser OS: _REPLACE_THISBROWSER_OS_GOES_HERE

Link to the gcode file you were printing when the problem occurred

Link to Gcode File: _REPLACE_THISGCODE_FILE_LINK_GOES_HERE

Link to settings.json

Link to settings.json with all passwords removed: _REPLACE_THISSETTINGS_JSON_LINK_GOES_HERE

Link to plugin_octolapse.log

Link to plugin_octolapse.log: LINK_GOES_HERE

Link to octoprint.log

Link to octoprint.log: _REPLACE_THISLINK_GOES_HERE

Link to contents of Javascript console in the browser

Link to javascript console output: _REPLACE_THISLINK_GOES_HERE

Screenshots and/or videos of the problem:

Screenshot/Video Links: _REPLACE_THISLINKs_GO_HERE

Please consider becoming a patron

If you like this project, please support my work by becoming a patron, and consider adding a 'star' to the repository. It takes a lot of time and effort to maintain the project and respond to issues. The cost of test prints, software, cameras, printer parts, etc. can quickly add up, so every bit helps.

You can find various videos and tutorials by subscribing to my Youtube channel. You can also follow me on Twitter.

FormerLurker commented 1 year ago

I also tried putting the deferred download script in the 'After Print End Script' section but it does not work either. It looks like the empty .zip is already created before this section is ran.

Yeah, it probably won't work exactly correctly here, since that script requires a payload that is generated in the rendering routine. I'll look into this.

FormerLurker commented 1 year ago

So, it turns out this was pretty easy to add. I haven't tested it because my DSLR isn't configured (takes a while and just rebuilt my system). Please give it a try and let me know. You can install from the devel branch in the plugin manager (get more, ..from url) with this link: https://github.com/FormerLurker/Octolapse/archive/refs/heads/devel.zip

dssamusaran commented 1 year ago

Hello,

Thanks for the answer and help, I'll give this a try asap and get back to you.

Regards

dssamusaran commented 1 year ago

Hi there.

It's working perfectly fine now, thanks for the support!

Do you think this will make it to the next release or should I stick with the devel release?

Thanks.

FormerLurker commented 1 year ago

Oh, it will be in there. The devel version you are running is perfectly safe (just 1 line of code has changed) to use, and you should still be notified of the next release.

Glad to be of assistance! Feel free to close the issue if you feel it's been resolved :)

dssamusaran commented 1 year ago

Great!

This is indeed perfectly resolved, I'm currently editing the timelapse done thanks to your fix :)