Commit a40da068 authored by Jan Möbius's avatar Jan Möbius
Browse files



git-svn-id: 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 0575f1b4
......@@ -1140,6 +1140,26 @@ INIFile ini;
QList<int> Core::objectList (QString _selection, QStringList _types)
QList<int> rv;
unsigned int ids = 0;
PluginFunctions::IteratorRestriction selection = PluginFunctions::ALL_OBJECTS;
foreach (QString s, _types)
if (!s.isEmpty ())
ids = typeId (s);
if (_selection == "source")
selection = PluginFunctions::SOURCE_OBJECTS;
else if (_selection == "target")
selection = PluginFunctions::TARGET_OBJECTS;
for ( PluginFunctions::ObjectIterator o_it(selection, ids) ;
o_it != PluginFunctions::objectsEnd(); ++o_it)
rv.append (o_it->id ());
return rv;
/// set the descriptions for scriptable slots of the core
void Core::setDescriptions(){
......@@ -1203,6 +1223,9 @@ void Core::setDescriptions(){
QString("Name,Toolbox List").split(","),
QString("Name of the new Viewmode, ; seperated list of toolboxes visible in this viewmode").split(","));
emit setSlotDescription("objectList(QString,QStringList)", "Returns object list",
QString("Selection type,Object types").split(","),
QString("Type of object selection (all,source,target),Object type (All,PolyMesh,TriangleMesh,...)").split(";"));
void Core::slotDeleteObject( int _id ){
......@@ -378,6 +378,9 @@ public slots:
/// write the current versions of all plugins to ini file
void writeVersionNumbers(QString _filename);
/// return the list of available object that has the given selection and type
QList<int> objectList (QString _selection, QStringList _types);
/** @name Scripting functions for controlling view modes
* @{ */
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