Skip to content

Macro recording of non required parameter of type File: file browser pops-up #491

Description

@gletort

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 ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions