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

Make it possible to specify macro category in code #1171

Open
XoBoR opened this issue Sep 10, 2023 · 0 comments
Open

Make it possible to specify macro category in code #1171

XoBoR opened this issue Sep 10, 2023 · 0 comments
Labels
FR - Enhancement New feature or request

Comments

@XoBoR
Copy link

XoBoR commented Sep 10, 2023

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 XoBoR added the FR - Enhancement New feature or request label Sep 10, 2023
@XoBoR XoBoR changed the title Make it possible to specify macro regions in code Make it possible to specify macro category in code Sep 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FR - Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant