Skip to content
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

FR: Load file metadata on "Print", so they can be evaluated in macro's #757

Open
ccatlett1984 opened this issue Nov 27, 2023 · 3 comments
Open
Labels
enhancement New feature or request

Comments

@ccatlett1984
Copy link

Is your feature request related to a problem? Please describe

Moonraker already contains all the metadata fields for a loaded gcode file, I would like to have them loaded as variables when a file is started for printing, so they are dynamically available to use in macros executed for that print job.

Describe the solution you'd like

When a print is started, load the metadata fields for that file as variables, prior to evaluation of any "start_gcode" from the slicer, this allows anything defined by the slicer to over-ride the metadata, but makes all the fields available for use.

Describe alternatives you've considered

re-slicing all files, to add an additional variable into the start_gcode in the slicer, each time a variable needs to be added, when the fields are already present in the file metadata just seems like a horrible time sink. Doing this in an automated/dynamic fashion in moonraker seems a much more tenable solution.

Additional information

No response

@ccatlett1984 ccatlett1984 added the enhancement New feature or request label Nov 27, 2023
@ccatlett1984
Copy link
Author

Can someone walk me through the existing pipeline for when a print is started?
I need to know where the variables in the start_gcode from the slicer are evaluated and made into variables a macro can use, to know where logic needs to be added to pull the metadata and loop through and create variables for fields that are present.

@Arksine
Copy link
Owner

Arksine commented Nov 27, 2023

I think what you are looking for is a feature addition to Klipper. Currently there is no way for Moonraker to send this data to Klipper, nor is there a way for Klipper to request it (or anything) from Moonraker.

I would suggest starting a thread on the Klipper Discourse to see if you get any traction.

@ccatlett1984
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants