diff --git a/src/meshlabplugins/render_gdp/meshrender.cpp b/src/meshlabplugins/render_gdp/meshrender.cpp index 5841ce66..3e0cbe5e 100644 --- a/src/meshlabplugins/render_gdp/meshrender.cpp +++ meshlab/src/meshlabplugins/render_gdp/meshrender.cpp @@ -29,6 +29,9 @@ #include #include "../../meshlab/glarea.h" +#include + + using namespace std; using namespace vcg; @@ -38,7 +41,7 @@ void MeshShaderRenderPlugin::initActionList() { qaNone->setCheckable(false); actionList << qaNone;*/ - QDir shadersDir = QDir(qApp->applicationDirPath()); + QDir shadersDir = PluginManager::getBaseDirPath(); #if defined(Q_OS_WIN) if (shadersDir.dirName() == "debug" || shadersDir.dirName() == "release" || shadersDir.dirName() == "plugins") shadersDir.cdUp(); diff --git a/src/meshlabplugins/render_gdp/shaderDialog.cpp b/src/meshlabplugins/render_gdp/shaderDialog.cpp index 13157579..1f14b7bf 100644 --- a/src/meshlabplugins/render_gdp/shaderDialog.cpp +++ meshlab/src/meshlabplugins/render_gdp/shaderDialog.cpp @@ -32,6 +32,8 @@ #include #include +#include + #define DECFACTOR 100000.0f using namespace vcg; @@ -317,7 +319,7 @@ void ShaderDialog::changeTexturePath(int i) { void ShaderDialog::browseTexturePath(int i) { QFileDialog fd(0,"Choose new texture"); - QDir shadersDir = QDir(qApp->applicationDirPath()); + QDir shadersDir = PluginManager::getBaseDirPath(); #if defined(Q_OS_WIN) if (shadersDir.dirName() == "debug" || shadersDir.dirName() == "release") shadersDir.cdUp(); diff --git a/src/plugins_experimental/render_splatpyramid/dialog.cpp b/src/plugins_experimental/render_splatpyramid/dialog.cpp index 589ba482..f0225c40 100644 --- a/src/plugins_experimental/render_splatpyramid/dialog.cpp +++ meshlab/src/plugins_experimental/render_splatpyramid/dialog.cpp @@ -3,6 +3,8 @@ #include #include +#include + #define DECFACTOR 100000.0f @@ -123,7 +125,7 @@ void Dialog::changeTexturePath(int i) { void Dialog::browseTexturePath(int i) { QFileDialog fd(0,"Choose new texture"); - QDir shadersDir = QDir(qApp->applicationDirPath()); + QDir shadersDir = PluginManager::getBaseDirPath(); #if defined(Q_OS_WIN) if (shadersDir.dirName() == "debug" || shadersDir.dirName() == "release") shadersDir.cdUp(); diff --git a/src/plugins_experimental/render_splatpyramid/splat_pyramid.cc b/src/plugins_experimental/render_splatpyramid/splat_pyramid.cc index a4915d10..d6325aa4 100644 --- a/src/plugins_experimental/render_splatpyramid/splat_pyramid.cc +++ meshlab/src/plugins_experimental/render_splatpyramid/splat_pyramid.cc @@ -18,6 +18,8 @@ #include #include +#include + //#include //#include "GL/glut.h" @@ -85,7 +87,7 @@ void PyramidPointRendererPlugin::Init(QAction *, MeshDocument &md, RenderMode &, objects[i].setRendererType( render_mode ); /// Sets the path to the meshlab's shaders directory - QDir shadersDir = QDir(qApp->applicationDirPath()); + QDir shadersDir = PluginManager::getBaseDirPath(); #if defined(Q_OS_WIN) if (shadersDir.dirName() == "debug" || shadersDir.dirName() == "release" || shadersDir.dirName() == "plugins" ) shadersDir.cdUp();