fluidd icon indicating copy to clipboard operation
fluidd copied to clipboard

Make it possible to specify macro category in code

Open XoBoR opened this issue 1 year ago • 0 comments

Is your feature request related to a problem? Please describe

Currently we have to set macro categories on a per printer and per browser basis. This is a lot of redundant work for people like me who are running multiple printers using the same macros, and could be alleviated by moving the category specification into the .cfg file.

Describe the solution you'd like

I discussed with @pedrolamas in the Discord that this could be implemented using a "dummy variable".

For Example:

[gcode_macro MY_MACRO]
variable_category: MY_CATEGORY
gcode:
  GXXX

This would however not provide a way to specify things like a color for the category.

A quick way to do this that i came up with would be by defining the categories as dummy macros like this:

[gcode_macro _REGION_MY_CATEGORY]
variable_color: 'red' / (1, 0, 0) # I dont know how colors are best specified in jinja 

Describe alternatives you've considered

No response

Additional information

No response

XoBoR avatar Sep 10 '23 18:09 XoBoR