From e1c4cce9299b4dd1a21be61dd12c1b1aa98b8f8b Mon Sep 17 00:00:00 2001 From: alemuntoni Date: Mon, 8 Nov 2021 15:39:45 +0100 Subject: [PATCH] filter ssynth and createiso python rename --- .../filter_createiso/filter_createiso.cpp | 16 +++++++++----- .../filter_createiso/filter_createiso.h | 2 +- .../filter_ssynth/filter_ssynth.cpp | 21 +++++++++++-------- .../filter_ssynth/filter_ssynth.h | 1 + 4 files changed, 25 insertions(+), 15 deletions(-) diff --git a/src/meshlabplugins/filter_createiso/filter_createiso.cpp b/src/meshlabplugins/filter_createiso/filter_createiso.cpp index be188d8da..fd61d04d1 100644 --- a/src/meshlabplugins/filter_createiso/filter_createiso.cpp +++ b/src/meshlabplugins/filter_createiso/filter_createiso.cpp @@ -58,12 +58,18 @@ QString FilterCreateIso::pluginName() const QString FilterCreateIso::filterName(ActionIDType filter) const { - switch(filter) - { - case FP_CREATEISO : return QString("Noisy Isosurface"); - default: assert(0); + switch (filter) { + case FP_CREATEISO: return QString("Noisy Isosurface"); + default: assert(0); return QString(); + } +} + +QString FilterCreateIso::pythonFilterName(ActionIDType f) const +{ + switch (f) { + case FP_CREATEISO: return QString("create_noisy_isosurface"); + default: assert(0); return QString(); } - return QString("error!"); } QString FilterCreateIso::filterInfo(ActionIDType filterId) const diff --git a/src/meshlabplugins/filter_createiso/filter_createiso.h b/src/meshlabplugins/filter_createiso/filter_createiso.h index a475b59b6..42ff8e4f8 100644 --- a/src/meshlabplugins/filter_createiso/filter_createiso.h +++ b/src/meshlabplugins/filter_createiso/filter_createiso.h @@ -57,6 +57,7 @@ class FilterCreateIso : public QObject, public FilterPlugin QString pluginName() const; QString filterName(ActionIDType filter) const; + QString pythonFilterName(ActionIDType f) const; QString filterInfo(ActionIDType filter) const; FilterClass getClass(const QAction*) const; @@ -65,7 +66,6 @@ class FilterCreateIso : public QObject, public FilterPlugin std::map applyFilter(const QAction* action, const RichParameterList & /*parent*/, MeshDocument &md, unsigned int& postConditionMask, vcg::CallBackPos * cb); FilterArity filterArity(const QAction*) const {return NONE;} - }; diff --git a/src/meshlabplugins/filter_ssynth/filter_ssynth.cpp b/src/meshlabplugins/filter_ssynth/filter_ssynth.cpp index b78eceaab..374ee4345 100644 --- a/src/meshlabplugins/filter_ssynth/filter_ssynth.cpp +++ b/src/meshlabplugins/filter_ssynth/filter_ssynth.cpp @@ -34,15 +34,18 @@ QString FilterSSynth::pluginName() const QString FilterSSynth::filterName(ActionIDType filter) const { - switch(filter) - { - case CR_SSYNTH: - return QString("Structure Synth Mesh Creation"); - break; - default: - assert(0); return QString("error"); - break; - } + switch (filter) { + case CR_SSYNTH: return QString("Structure Synth Mesh Creation"); break; + default: assert(0); return QString(); + } +} + +QString FilterSSynth::pythonFilterName(ActionIDType f) const +{ + switch (f) { + case CR_SSYNTH: return QString("create_mesh_by_grammar"); break; + default: assert(0); return QString(); + } } QString FilterSSynth::filterInfo(ActionIDType filterId) const diff --git a/src/meshlabplugins/filter_ssynth/filter_ssynth.h b/src/meshlabplugins/filter_ssynth/filter_ssynth.h index e5a18e0df..12873ab4b 100644 --- a/src/meshlabplugins/filter_ssynth/filter_ssynth.h +++ b/src/meshlabplugins/filter_ssynth/filter_ssynth.h @@ -41,6 +41,7 @@ class FilterSSynth : public QObject, public IOPlugin, public FilterPlugin{ ~FilterSSynth(){} QString pluginName() const; QString filterName(ActionIDType filter) const; + QString pythonFilterName(ActionIDType f) const; QString filterInfo(ActionIDType filter) const; int getRequirements(const QAction*); RichParameterList initParameterList(const QAction*, const MeshDocument &/*m*/);