# HG changeset patch # User Chris Cannam # Date 1161085316 0 # Node ID f7cb156508ccfd3cb95e53d4604bc2a36b0826de # Parent 684b17ff7fee82ef8afeff71d9ac372247aea569 * Avoid showing input selection and channel selection for generator plugins diff -r 684b17ff7fee -r f7cb156508cc transform/TransformFactory.cpp --- a/transform/TransformFactory.cpp Mon Oct 16 20:41:34 2006 +0000 +++ b/transform/TransformFactory.cpp Tue Oct 17 11:41:56 2006 +0000 @@ -480,6 +480,7 @@ bool frequency = false; bool effect = false; + bool generator = false; if (FeatureExtractionPluginFactory::instanceFor(id)) { @@ -515,6 +516,10 @@ effect = true; } + if (desc->audioInputPortCount == 0) { + generator = true; + } + if (output != "A") { int outputNo = output.toInt(); if (outputNo >= 0 && outputNo < desc->controlOutputPortCount) { @@ -568,12 +573,14 @@ PluginParameterDialog *dialog = new PluginParameterDialog(plugin); - if (candidateModelNames.size() > 1) { + if (candidateModelNames.size() > 1 && !generator) { dialog->setCandidateInputModels(candidateModelNames); } - dialog->setChannelArrangement(sourceChannels, targetChannels, - defaultChannel); + if (targetChannels > 0) { + dialog->setChannelArrangement(sourceChannels, targetChannels, + defaultChannel); + } dialog->setOutputLabel(outputLabel);