old applyFilter removed, cleanups

This commit is contained in:
alemuntoni 2021-03-05 15:35:15 +01:00
parent e2e84b5cae
commit cdfd55582a
4 changed files with 0 additions and 33 deletions

View File

@ -8,20 +8,6 @@ QString FilterPlugin::pythonFilterName(MeshLabPlugin::ActionIDType f) const
return pymeshlab::computePythonName(filterName(f));
}
//std::map<std::string, QVariant> FilterPlugin::applyFilter(
// const QAction* filter,
// const RichParameterList& par,
// MeshDocument& md, unsigned int& postConditionMask,
// vcg::CallBackPos* cb)
//{
// std::map<std::string, QVariant> output;
// bool result = applyFilter(filter, md, output, postConditionMask, par, cb);
// if (!result) {
// throw MLException(errorMessage);
// }
// return output;
//}
bool FilterPlugin::isFilterApplicable(const QAction* act, const MeshModel& m, QStringList &MissingItems) const
{
int preMask = getPreConditions(act);

View File

@ -178,11 +178,6 @@ public:
unsigned int& postConditionMask,
vcg::CallBackPos* cb) = 0;
/**
* THIS FUNCTION IS GOING TO BE REMOVED. Please use the apply filter declared above.
*/
//virtual bool applyFilter(const QAction* filter, MeshDocument& md, std::map<std::string, QVariant>& outputValues, unsigned int& postConditionMask, const RichParameterList& par, vcg::CallBackPos* cb) = 0;
/**
* \brief tests if a filter is applicable to a mesh.
* This function is a handy wrapper used by the framework for the \a getPreConditions callback;
@ -214,12 +209,6 @@ public:
initParameterList(filter, *(md.mm()), par);
}
/**
* @brief is invoked by the framework when the applyFilter fails to give some info to the user about the filter failure
* Filters \b must never use QMessageBox for reporting errors.
* Failing filters should put some meaningful information inside the errorMessage string and return false with the \ref applyFilter
*/
const QString& errorMsg() const { return this->errorMessage; }
virtual QString filterInfo(const QAction* a) const { return this->filterInfo(ID(a)); }
virtual QString filterName(const QAction* a) const { return this->filterName(ID(a)); }
virtual QString pythonFilterName(const QAction* a) const {return this->pythonFilterName(ID(a)); }
@ -244,7 +233,6 @@ public:
* BE CAREFUL! this function does NOT change in anyway the state of the MeshModel!!!!
*/
int previewOnCreatedAttributes(const QAction* act, const MeshModel& mm) const;
QString generatedScriptCode;
MLPluginGLContext* glContext;
protected:
@ -256,9 +244,6 @@ protected:
QList <QAction*> actionList;
QList <ActionIDType> typeList;
// this string is used to pass back to the framework error messages in case of failure of a filter apply.
QString errorMessage;
};
#define FILTER_PLUGIN_IID "vcg.meshlab.FilterPlugin/1.0"

View File

@ -247,7 +247,6 @@ std::map<std::string, QVariant> FilterImgPatchParamPlugin::applyFilter(
}
if( activeRasters.empty() ) {
this->errorMessage="No active Raster";
{
glContext->doneCurrent();
throw MLException("You need to have at least one valid raster layer in your project, to apply this filter"); // text

View File

@ -757,9 +757,7 @@ std::map<std::string, QVariant> FilterLayerPlugin::applyFilter(
float k1 = node1.toElement().text().toFloat();
if (k1 != 0.0f)
{
this->errorMessage = "Distortion is not supported";
log("Warning! Distortion parameters won't be imported! Please undistort the images in Photoscan before!"); // text
}
}
@ -836,7 +834,6 @@ std::map<std::string, QVariant> FilterLayerPlugin::applyFilter(
else
{
this->errorMessage = "No file to open";
throw MLException("Unknown file type");
}
} break;