I am writing a script and I would like to let the user choose the layer but i would like to default a layer (when it is open in the project) in the input field and if the user changes it he can choose another one from the list. I can specify a the drop down list or a specific layer but then the dropdown option is no longer available. Can I specify a default layer like I can do it with numbers?
This gives me the dropdown list with my layer options from the list
alg_params = {
'INPUT': parameters['Input_name'],
'INPUT_FIELDS': [''],
'OVERLAY': parameters['Overlay_name'],
'OVERLAY_FIELDS': [''],
'OVERLAY_FIELDS_PREFIX': '',
'OUTPUT': parameters['result_name']
In this I choose the layer, but its not a default, it is hard set and my dropdown list disappears.
alg_params = {
'INPUT': 'Input_name_d9798079_c0d4_4e60_a3f7_ce2ca427d004',
'INPUT_FIELDS': [''],
'OVERLAY': parameters['Overlay_name'],
'OVERLAY_FIELDS': [''],
'OVERLAY_FIELDS_PREFIX': '',
'OUTPUT': parameters['result_name']