Suppose a script has a variable number of outputs, which may or may not be produced depending on settings:
##Input_layer=vector##Output_1=output vector##Produce_output_2=boolean##Output_2=output vectorfrom qgis.core import *def create_my_output(path): # whatever...create_my_output(Output_1)if Produce_output_2: create_my_output(Output_2)If this script is run with "Produce output 2" unchecked then QGIS displays a warning dialog saying Output 2 was not correctly produced, even though not producing Output 2 was clearly intended behaviour.
Is there a way to tell QGIS that an output is optional?
أكثر...
##Input_layer=vector##Output_1=output vector##Produce_output_2=boolean##Output_2=output vectorfrom qgis.core import *def create_my_output(path): # whatever...create_my_output(Output_1)if Produce_output_2: create_my_output(Output_2)If this script is run with "Produce output 2" unchecked then QGIS displays a warning dialog saying Output 2 was not correctly produced, even though not producing Output 2 was clearly intended behaviour.
Is there a way to tell QGIS that an output is optional?
أكثر...