Disable Custom Control Buttons while printing

Hi all:

I have created 3 buttons using Custom Control Editor Plugin.
Load Filament, Change Filament, and Unload Filament.

But I want to disable Load and Unload filament while a print is running.
I can do this ?

Thanks.

Sebas.

That's not possible through the core custom control mechanism, which is what the custom control editor plugin is based on. There's a way to inject additional JS into the control definition, but I just checked and it appears to not work like it should :thinking:

But you could write a plugin, use the getAdditionalControls callback and define some custom JS using the printerStateViewModel to detect printing state and react accordingly.