Commit d8edf462 authored by Mike Kremer's avatar Mike Kremer
Browse files

Added option to load Flipper selections.

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@12289 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 222d95ad
......@@ -44,6 +44,8 @@
#include <set>
#include <OpenFlipper/BasePlugin/PluginFunctions.hh>
#include <OpenFlipper/common/GlobalOptions.hh>
#include <MeshTools/MeshSelectionT.hh>
// Primitive type icons
......@@ -69,6 +71,7 @@
#define V_COLORIZE "Colorize Vertex Selection"
#define V_HANDLE "Set to Handle Region"
#define V_MODELING "Set to Modeling Region"
#define V_LOAD_FLIPPER "Load Flipper Selection"
// Edges
#define E_SELECT_ALL "Select All Edges"
#define E_CLEAR "Clear Edge Selection"
......@@ -181,6 +184,7 @@ void MeshObjectSelectionPlugin::pluginsInitialized() {
vertexOperations.append(V_COLORIZE);
vertexOperations.append(V_HANDLE);
vertexOperations.append(V_MODELING);
vertexOperations.append(V_LOAD_FLIPPER);
// Define edge operations
QStringList edgeOperations;
......@@ -441,6 +445,17 @@ void MeshObjectSelectionPlugin::slotSelectionOperation(QString _operation) {
clearVertexSelection(o_it->id());
}
}
} else if(_operation == V_LOAD_FLIPPER) {
// Load Flipper selection file
QString fileName = QFileDialog::getOpenFileName(0,
tr("Open Flipper Selection File"), OpenFlipper::Options::dataDirStr(),
tr("Flipper Selection Files (*.sel)"));
for (PluginFunctions::ObjectIterator o_it(restriction, DataType(DATA_ALL));
o_it != PluginFunctions::objectsEnd(); ++o_it) {
if (o_it->visible()) {
loadFlipperModelingSelection(o_it->id(), fileName);
}
}
} else if(_operation == E_SELECT_ALL) {
// Select all edges
for (PluginFunctions::ObjectIterator o_it(restriction, DataType(DATA_ALL));
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment