[Paraview] Patch for pqPluginManager to better readability

Michael Jackson mike.jackson at bluequartz.net
Wed Jan 13 14:02:20 EST 2010


I was trying to diagnose why ParaView was not loading some of my  
plugins and it occurred to me that the dialog box for loading plugins,  
while somewhat verbose, is not that easy to interpret:

ParaView.app/Contents/MacOS/../Plugins;ParaView.app/Contents/ 
MacOS/../../Plugins.

  I was thinking it would be easier if it just read:

[Path To ParaView]/ParaView.app/Contents/Plugins;[Path To ParaView]/ 
Plugins;

So in pqPluginManager.cxx, down around line 471 I have the following:

#if defined (Q_OS_MAC)
//Look in the Application Package "ParaView.app/Contents/Plugins
QDir appDir (QCoreApplication::applicationDirPath());
appDir.cdUp();
pv_plugin_path += appDir.absolutePath() + QDir::separator() +  
"Plugins;";
//Look for a folder called "Plugins" at the same level as ParaView.app
appDir.cdUp();
appDir.cdUp();
pv_plugin_path += appDir.absolutePath() + QDir::separator() +  
"Plugins;";
//Look for a plugins at the same level as ParaView.app
pv_plugin_path += appDir.absolutePath() + QDir::separator() + ";";
#else
     pv_plugin_path += QCoreApplication::applicationDirPath() +  
QDir::separator()
       + "plugins";
#endif

Thoughts from anyone?

Also, I noticed that while plugins are built into the  
$PARAVIEW_BINARY_DIR/bin they are not automatically loaded from there?  
In the patch above, an additional line is there to add this directory  
to the list of directories to check. At least on OS X, this makes it  
easier to debug plugins? Or am I missing something completely? I know  
about PV_PLUGIN_PATH but really consider that a hack. Thoughts?

_________________________________________________________
Mike Jackson                  mike.jackson at bluequartz.net
BlueQuartz Software                    www.bluequartz.net
Principal Software Engineer                  Dayton, Ohio



More information about the ParaView mailing list