Print-Tuning-Guide icon indicating copy to clipboard operation
Print-Tuning-Guide copied to clipboard

GET_VARIABLE macro crashes when "printer." is left in

Open ghoudy2shoes opened this issue 1 year ago • 1 comments

When debugging a macro that gets a variable I just want to copy paste the whole variable (example: GET_VARIABLE NAME=printer.toolhead.homed_axes) but that will fail unless you manually remove the start (GET_VARIABLE NAME=toolhead.homed_axes).

To fix it I added these few lines right after the variables are set.

    {% if names|first == "printer" %}
      {% set names = names[1:] %}
    {% endif %}

ghoudy2shoes avatar Jan 09 '25 13:01 ghoudy2shoes