diff --git a/BasePlugin/PluginFunctions.cc b/BasePlugin/PluginFunctions.cc index 61642c0d7ca1fff0f47e52610b8f452dfafa9761..3b2382a663dbe3d13c104ad7f01a6e9a73475ac8 100644 --- a/BasePlugin/PluginFunctions.cc +++ b/BasePlugin/PluginFunctions.cc @@ -302,7 +302,7 @@ bool getAllMeshes( std::vector& _identifiers ) { _identifiers.clear(); // find changed manipulator - for ( PluginFunctions::ObjectIterator o_it(PluginFunctions::ALL_OBJECTS,DATA_TRIANGLE_MESH) ; + for ( PluginFunctions::ObjectIterator o_it(PluginFunctions::ALL_OBJECTS,typeId("TriangleMesh")) ; o_it != PluginFunctions::objectsEnd(); ++o_it) { _identifiers.push_back( o_it->id() ); } @@ -894,7 +894,7 @@ void get_all_objects( std::vector < BaseObjectData*>& _objects ) { _objects.clear(); // find changed manipulator - for ( PluginFunctions::ObjectIterator o_it(PluginFunctions::ALL_OBJECTS,DATA_TRIANGLE_MESH) ; + for ( PluginFunctions::ObjectIterator o_it(PluginFunctions::ALL_OBJECTS,DATA_ALL) ; o_it != PluginFunctions::objectsEnd(); ++o_it) { _objects.push_back( *o_it ); } diff --git a/Core/ParseIni.cc b/Core/ParseIni.cc index 5a1de7965a176e0b38dbd8cbc4bbb7050385d766..b8feeb853c6ab95aeb2b33471063c572703005ed 100644 --- a/Core/ParseIni.cc +++ b/Core/ParseIni.cc @@ -650,7 +650,7 @@ void Core::openIniFile( QString _filename, } int tmpType; - DataType type = DATA_TRIANGLE_MESH; + DataType type = typeId("TriangleMesh"); // First check for old datatype style (Only numbers .. therefore not consistent for runtime added types) if ( ini.get_entry( tmpType, sectionName , "type" )) { diff --git a/common/BaseObject.cc b/common/BaseObject.cc index e7fb163df5ade40de58d3d355c681c810c95603b..03c85b70640f74aa51659bbdca4ababad4efa6fd 100644 --- a/common/BaseObject.cc +++ b/common/BaseObject.cc @@ -172,7 +172,6 @@ void BaseObject::persistentId( int _id ) { void BaseObject::cleanup() { persistentId_ = -1; - objectType_ = DATA_UNKNOWN; flags_.clear(); diff --git a/common/DataTypes.hh b/common/DataTypes.hh index 34feffc71266b3bbcf4ee4e464ec938418dba09c..ba4a8393f7ee8a0b7e0e0de48ba32aa8ce41ae1c 100644 --- a/common/DataTypes.hh +++ b/common/DataTypes.hh @@ -83,14 +83,6 @@ /// Items used for Grouping #define DATA_GROUP 1 -/// Triangle Mesh objects -#define DATA_TRIANGLE_MESH typeId("TriangleMesh") -#define DATA_TRIANGLE_MESH_CONST_ID 2 - -/// Poly Mesh Objects -#define DATA_POLY_MESH typeId("PolyMesh") -#define DATA_POLY_MESH_CONST_ID 4 - /// Identifier for all available objects const unsigned int DATA_ALL = UINT_MAX; diff --git a/common/Types.cc b/common/Types.cc index fac2c488117dadcea80f06794683c6d4ca0aa543..29b454f2f098c835df72c2088b6fc43a70dd4df8 100644 --- a/common/Types.cc +++ b/common/Types.cc @@ -67,7 +67,7 @@ /** This field defines the start id for custom datatypes. It starts high to avoid conflicts with previously * hardcoded versions. */ -static int nextTypeId_ = 8; +static int nextTypeId_ = 2; /** This map maps an dataType id to an typeName */ @@ -126,29 +126,16 @@ void initializeTypes() { typeToTypeInfo[DATA_GROUP] = types.size(); types.push_back( TypeInfo(DATA_GROUP ,"Group" ,"group.png", QCoreApplication::translate("Types","Group")) ); - stringToTypeInfo["TriangleMesh"] = types.size(); - typeToTypeInfo[DATA_TRIANGLE_MESH_CONST_ID] = types.size(); - types.push_back( TypeInfo(DATA_TRIANGLE_MESH_CONST_ID ,"TriangleMesh" ,"TriangleType.png", QCoreApplication::translate("Types","Triangle Mesh")) ); - - stringToTypeInfo["PolyMesh"] = types.size(); - typeToTypeInfo[DATA_POLY_MESH_CONST_ID] = types.size(); - types.push_back( TypeInfo(DATA_POLY_MESH_CONST_ID ,"PolyMesh" ,"PolyType.png", QCoreApplication::translate("Types","Poly Mesh")) ); - stringToTypeInfo["All"] = types.size(); typeToTypeInfo[DATA_ALL] = types.size(); types.push_back( TypeInfo(DATA_ALL ,"All" ,"Unknown.png", QCoreApplication::translate("Types","All")) ); typeToString[DATA_UNKNOWN] = "Unknown"; typeToString[DATA_GROUP] = "Group"; - typeToString[DATA_TRIANGLE_MESH_CONST_ID] = "TriangleMesh"; - typeToString[DATA_POLY_MESH_CONST_ID] = "PolyMesh"; typeToString[DATA_ALL] = "All"; // Preload the static icons setTypeIcon(DATA_GROUP,"group.png"); - setTypeIcon(DATA_TRIANGLE_MESH_CONST_ID,"TriangleType.png"); - setTypeIcon(DATA_POLY_MESH_CONST_ID,"PolyType.png"); - } /// Adds a datatype and returns the id for the new type