In a Command interface, if a parameter to select a file is defined like this:
@Parameter(label="file", required=false)
File file;
It works well when running the plugin. If the call is recorded by the MacroRecorder, and no file is selected (not mandatory), the file= will not be present in the macro line. Then when running the recorded macro, a pop-up will appear to let the user choose a file even if it's not required.
This is the recorded line:
run("Cellpose...", "cp_model=cyto3");
It's working fine by adding file= in the macro line, keeping it blank, then no pop-up appears.
This would work fine (no pop-up):
run("Cellpose...", "file= cp_model=cyto3");
Is there a possibility for the MacroRecorder to add in the recorded line even the non required parameter and putting it to blank value to avoid the pop-up browser ?
In a
Commandinterface, if a parameter to select a file is defined like this:It works well when running the plugin. If the call is recorded by the MacroRecorder, and no file is selected (not mandatory), the
file=will not be present in the macro line. Then when running the recorded macro, a pop-up will appear to let the user choose a file even if it's not required.This is the recorded line:
It's working fine by adding
file=in the macro line, keeping it blank, then no pop-up appears.This would work fine (no pop-up):
Is there a possibility for the MacroRecorder to add in the recorded line even the non required parameter and putting it to blank value to avoid the pop-up browser ?