Getting Started - cnr-isti-vclab/meshlab-extra-plugins GitHub Wiki
Note: these wiki pages are still a work in progress, and some pages may still be missing.
Build MeshLab
Before starting to develop a MeshLab plugin, you need to build MeshLab. MeshLab has only one major dependency, that is Qt. To build MeshLab you need:
- a C++11 compiler (we support GCC, CLang and MSVC)
- cmake
- Qt properly installed in your system
- git (to clone the MeshLab repository)
Once these requirements are satisfied, you can try to build MeshLab.
1. Clone MeshLab
Open a shell and run:
git clone --recursive https://github.com/cnr-isti-vclab/meshlab
Note the --recursive
parameter. MeshLab contains git submodules that will be downloaded only with this parameter.
2. Build
Once cloned the repository, move into the src
directory, which contains the source code of MeshLab.
Then, you can open the CMakeLists.txt
file with your favourite IDE that supports CMake (e.g. QtCreator, CLion, Visual Studio). If everything has been installed correctly, the cmake configuration should be parsed successfully and you should be able to build MeshLab.
You can also build MeshLab from shell. Typically, to build cmake project you should run the following commands:
cd src
mkdir build
cmake ..
make
Start developing a MeshLab plugin
To start coding your plugin, we suggest to start from one of the plugin examples of this repository. For example, if you want to develop a filter plugin, copy the filter_example
directory, paste it into the path src/meshlabplugins
of your meshlab repository, and rename the directory with the name of your plugin.
Then, to add the plugin to the project tree, you'll just need to add the name of your plugin in the list of plugins called MESHLAB_PLUGINS
that you can find in the src/CMakeLists.txt
file. For example, if the folder of your plugin in the meshlabplugins
directory is called filter_mybeautifulplugin
, you'll just need the line meshlabplugins/filter_mybeautifulplugin
here. Run again cmake
and your plugin should appear in the project tree under meshlabplugins
.
You are ready to start developing your plugin!