summarylogtreecommitdiffstats
path: root/shaders_dir.patch
blob: 432b15078c5716c6cd8c353e4140f611acb49e0d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
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 <QTextStream>
 #include "../../meshlab/glarea.h"
 
+#include <common/pluginmanager.h>
+
+
 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 <QCheckBox>
 #include <QPushButton>
 
+#include <common/pluginmanager.h>
+
 #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 <QFileDialog>
 #include <QMessageBox>
 
+#include <common/pluginmanager.h>
+
 
 #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 <QTextStream>
 #include <wrap/gl/trimesh.h>
 
+#include <common/pluginmanager.h>
+
 //#include <QGLFramebufferObject>
 
 //#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();