Commit f5399d51 authored by Dirk Wilden's avatar Dirk Wilden
Browse files

switch case -> if changed

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@6279 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 0612c55f
...@@ -64,25 +64,20 @@ void SelectionPlugin::selectEdges( int objectId , idList _edgeList ) { ...@@ -64,25 +64,20 @@ void SelectionPlugin::selectEdges( int objectId , idList _edgeList ) {
if ( _edgeList.size() == 0 ) if ( _edgeList.size() == 0 )
return; return;
switch ( object->dataType( ) ) { if ( object->dataType() == DATA_TRIANGLE_MESH )
case DATA_TRIANGLE_MESH :
MeshSelection::selectEdges(PluginFunctions::triMesh(object), _edgeList); MeshSelection::selectEdges(PluginFunctions::triMesh(object), _edgeList);
break; else if ( object->dataType() == DATA_POLY_MESH )
case DATA_POLY_MESH :
MeshSelection::selectEdges(PluginFunctions::polyMesh(object), _edgeList); MeshSelection::selectEdges(PluginFunctions::polyMesh(object), _edgeList);
break;
#ifdef ENABLE_POLYLINE_SUPPORT #ifdef ENABLE_POLYLINE_SUPPORT
case DATA_POLY_LINE : else if ( object->dataType() == DATA_POLY_LINE )
PolyLineSelection::selectEdges( PluginFunctions::polyLine(object) , _edgeList ); PolyLineSelection::selectEdges( PluginFunctions::polyLine(object) , _edgeList );
break;
#endif #endif
#ifdef ENABLE_BSPLINECURVE_SUPPORT #ifdef ENABLE_BSPLINECURVE_SUPPORT
case DATA_BSPLINE_CURVE : else if ( object->dataType() == DATA_BSPLINE_CURVE )
BSplineCurveSelection::selectEdges( PluginFunctions::splineCurve(object) , _edgeList ); BSplineCurveSelection::selectEdges( PluginFunctions::splineCurve(object) , _edgeList );
break;
#endif #endif
default: else{
emit log(LOGERR,"selectEdges : Unsupported object Type" ); emit log(LOGERR,"selectEdges : Unsupported object Type" );
return; return;
} }
...@@ -111,24 +106,19 @@ void SelectionPlugin::unselectEdges( int objectId , idList _edgeList ) { ...@@ -111,24 +106,19 @@ void SelectionPlugin::unselectEdges( int objectId , idList _edgeList ) {
if ( _edgeList.size() == 0 ) if ( _edgeList.size() == 0 )
return; return;
switch ( object->dataType( ) ) { if ( object->dataType() == DATA_TRIANGLE_MESH )
case DATA_TRIANGLE_MESH :
MeshSelection::unselectEdges(PluginFunctions::triMesh(object), _edgeList); MeshSelection::unselectEdges(PluginFunctions::triMesh(object), _edgeList);
break; else if ( object->dataType() == DATA_POLY_MESH )
case DATA_POLY_MESH :
MeshSelection::unselectEdges(PluginFunctions::polyMesh(object), _edgeList); MeshSelection::unselectEdges(PluginFunctions::polyMesh(object), _edgeList);
break;
#ifdef ENABLE_POLYLINE_SUPPORT #ifdef ENABLE_POLYLINE_SUPPORT
case DATA_POLY_LINE : else if ( object->dataType() == DATA_POLY_LINE )
PolyLineSelection::unselectEdges( PluginFunctions::polyLine(object) , _edgeList ); PolyLineSelection::unselectEdges( PluginFunctions::polyLine(object) , _edgeList );
break;
#endif #endif
#ifdef ENABLE_BSPLINECURVE_SUPPORT #ifdef ENABLE_BSPLINECURVE_SUPPORT
case DATA_BSPLINE_CURVE : else if ( object->dataType() == DATA_BSPLINE_CURVE )
BSplineCurveSelection::unselectEdges( PluginFunctions::splineCurve(object) , _edgeList ); BSplineCurveSelection::unselectEdges( PluginFunctions::splineCurve(object) , _edgeList );
break;
#endif #endif
default: else{
emit log(LOGERR,"unselectEdges : Unsupported object Type" ); emit log(LOGERR,"unselectEdges : Unsupported object Type" );
return; return;
} }
...@@ -155,24 +145,19 @@ void SelectionPlugin::selectAllEdges( int objectId ) ...@@ -155,24 +145,19 @@ void SelectionPlugin::selectAllEdges( int objectId )
return; return;
} }
switch ( object->dataType( ) ) { if ( object->dataType() == DATA_TRIANGLE_MESH )
case DATA_TRIANGLE_MESH :
MeshSelection::selectAllEdges(PluginFunctions::triMesh(object)); MeshSelection::selectAllEdges(PluginFunctions::triMesh(object));
break; else if ( object->dataType() == DATA_POLY_MESH )
case DATA_POLY_MESH :
MeshSelection::selectAllEdges(PluginFunctions::polyMesh(object)); MeshSelection::selectAllEdges(PluginFunctions::polyMesh(object));
break;
#ifdef ENABLE_POLYLINE_SUPPORT #ifdef ENABLE_POLYLINE_SUPPORT
case DATA_POLY_LINE : else if ( object->dataType() == DATA_POLY_LINE )
PolyLineSelection::selectAllEdges( PluginFunctions::polyLine(object) ); PolyLineSelection::selectAllEdges( PluginFunctions::polyLine(object) );
break;
#endif #endif
#ifdef ENABLE_BSPLINECURVE_SUPPORT #ifdef ENABLE_BSPLINECURVE_SUPPORT
case DATA_BSPLINE_CURVE : else if ( object->dataType() == DATA_BSPLINE_CURVE )
BSplineCurveSelection::selectAllEdges( PluginFunctions::splineCurve(object) ); BSplineCurveSelection::selectAllEdges( PluginFunctions::splineCurve(object) );
break;
#endif #endif
default: else{
emit log(LOGERR,"selectAllEdges : Unsupported object Type" ); emit log(LOGERR,"selectAllEdges : Unsupported object Type" );
return; return;
} }
...@@ -191,24 +176,19 @@ void SelectionPlugin::clearEdgeSelection( int objectId ) ...@@ -191,24 +176,19 @@ void SelectionPlugin::clearEdgeSelection( int objectId )
return; return;
} }
switch ( object->dataType( ) ) { if ( object->dataType() == DATA_TRIANGLE_MESH )
case DATA_TRIANGLE_MESH :
MeshSelection::clearEdgeSelection(PluginFunctions::triMesh(object)); MeshSelection::clearEdgeSelection(PluginFunctions::triMesh(object));
break; else if ( object->dataType() == DATA_POLY_MESH )
case DATA_POLY_MESH :
MeshSelection::clearEdgeSelection(PluginFunctions::polyMesh(object)); MeshSelection::clearEdgeSelection(PluginFunctions::polyMesh(object));
break;
#ifdef ENABLE_POLYLINE_SUPPORT #ifdef ENABLE_POLYLINE_SUPPORT
case DATA_POLY_LINE : else if ( object->dataType() == DATA_POLY_LINE )
PolyLineSelection::clearEdgeSelection( PluginFunctions::polyLine(object) ); PolyLineSelection::clearEdgeSelection( PluginFunctions::polyLine(object) );
break;
#endif #endif
#ifdef ENABLE_BSPLINECURVE_SUPPORT #ifdef ENABLE_BSPLINECURVE_SUPPORT
case DATA_BSPLINE_CURVE : else if ( object->dataType() == DATA_BSPLINE_CURVE )
BSplineCurveSelection::clearEdgeSelection( PluginFunctions::splineCurve(object) ); BSplineCurveSelection::clearEdgeSelection( PluginFunctions::splineCurve(object) );
break;
#endif #endif
default: else{
emit log(LOGERR,"clearEdgeSelection : Unsupported object Type" ); emit log(LOGERR,"clearEdgeSelection : Unsupported object Type" );
return; return;
} }
...@@ -227,24 +207,19 @@ void SelectionPlugin::invertEdgeSelection( int objectId ) ...@@ -227,24 +207,19 @@ void SelectionPlugin::invertEdgeSelection( int objectId )
return; return;
} }
switch ( object->dataType( ) ) { if ( object->dataType() == DATA_TRIANGLE_MESH )
case DATA_TRIANGLE_MESH :
MeshSelection::invertEdgeSelection(PluginFunctions::triMesh(object)); MeshSelection::invertEdgeSelection(PluginFunctions::triMesh(object));
break; else if ( object->dataType() == DATA_POLY_MESH )
case DATA_POLY_MESH :
MeshSelection::invertEdgeSelection(PluginFunctions::polyMesh(object)); MeshSelection::invertEdgeSelection(PluginFunctions::polyMesh(object));
break;
#ifdef ENABLE_POLYLINE_SUPPORT #ifdef ENABLE_POLYLINE_SUPPORT
case DATA_POLY_LINE : else if ( object->dataType() == DATA_POLY_LINE )
PolyLineSelection::invertEdgeSelection( PluginFunctions::polyLine(object) ); PolyLineSelection::invertEdgeSelection( PluginFunctions::polyLine(object) );
break;
#endif #endif
#ifdef ENABLE_BSPLINECURVE_SUPPORT #ifdef ENABLE_BSPLINECURVE_SUPPORT
case DATA_BSPLINE_CURVE : else if ( object->dataType() == DATA_BSPLINE_CURVE )
BSplineCurveSelection::invertEdgeSelection( PluginFunctions::splineCurve(object) ); BSplineCurveSelection::invertEdgeSelection( PluginFunctions::splineCurve(object) );
break;
#endif #endif
default: else{
emit log(LOGERR,"invertEdgeSelection : Unsupported object Type" ); emit log(LOGERR,"invertEdgeSelection : Unsupported object Type" );
return; return;
} }
...@@ -263,25 +238,20 @@ void SelectionPlugin::selectBoundaryEdges( int objectId ) ...@@ -263,25 +238,20 @@ void SelectionPlugin::selectBoundaryEdges( int objectId )
return; return;
} }
switch ( object->dataType( ) ) { if ( object->dataType() == DATA_TRIANGLE_MESH )
case DATA_TRIANGLE_MESH :
MeshSelection::selectBoundaryEdges(PluginFunctions::triMesh(object)); MeshSelection::selectBoundaryEdges(PluginFunctions::triMesh(object));
break; else if ( object->dataType() == DATA_POLY_MESH )
case DATA_POLY_MESH :
MeshSelection::selectBoundaryEdges(PluginFunctions::polyMesh(object)); MeshSelection::selectBoundaryEdges(PluginFunctions::polyMesh(object));
break;
#ifdef ENABLE_POLYLINE_SUPPORT #ifdef ENABLE_POLYLINE_SUPPORT
case DATA_POLY_LINE : else if ( object->dataType() == DATA_POLY_LINE )
emit log(LOGERR,"selectBoundaryEdges : Not implemented on PolyLines" ); emit log(LOGERR,"selectBoundaryEdges : Not implemented on PolyLines" );
// PolyLineSelection::selectAllEdges( PluginFunctions::polyLine(object) ); // PolyLineSelection::selectAllEdges( PluginFunctions::polyLine(object) );
break;
#endif #endif
#ifdef ENABLE_BSPLINECURVE_SUPPORT #ifdef ENABLE_BSPLINECURVE_SUPPORT
case DATA_BSPLINE_CURVE : else if ( object->dataType() == DATA_BSPLINE_CURVE )
emit log(LOGERR,"selectBoundaryEdges : Not implemented on BSplineCurves" ); emit log(LOGERR,"selectBoundaryEdges : Not implemented on BSplineCurves" );
break;
#endif #endif
default: else{
emit log(LOGERR,"selectBoundaryEdges : Unsupported object Type" ); emit log(LOGERR,"selectBoundaryEdges : Unsupported object Type" );
return; return;
} }
...@@ -302,24 +272,19 @@ idList SelectionPlugin::getEdgeSelection( int objectId ) ...@@ -302,24 +272,19 @@ idList SelectionPlugin::getEdgeSelection( int objectId )
emit scriptInfo( "getEdgeSelection( ObjectId )" ); emit scriptInfo( "getEdgeSelection( ObjectId )" );
switch ( object->dataType( ) ) { if ( object->dataType() == DATA_TRIANGLE_MESH )
case DATA_TRIANGLE_MESH :
return MeshSelection::getEdgeSelection(PluginFunctions::triMesh(object)); return MeshSelection::getEdgeSelection(PluginFunctions::triMesh(object));
break; else if ( object->dataType() == DATA_POLY_MESH )
case DATA_POLY_MESH :
return MeshSelection::getEdgeSelection(PluginFunctions::polyMesh(object)); return MeshSelection::getEdgeSelection(PluginFunctions::polyMesh(object));
break;
#ifdef ENABLE_POLYLINE_SUPPORT #ifdef ENABLE_POLYLINE_SUPPORT
case DATA_POLY_LINE : else if ( object->dataType() == DATA_POLY_LINE )
return PolyLineSelection::getEdgeSelection( PluginFunctions::polyLine(object) ); return PolyLineSelection::getEdgeSelection( PluginFunctions::polyLine(object) );
break;
#endif #endif
#ifdef ENABLE_BSPLINECURVE_SUPPORT #ifdef ENABLE_BSPLINECURVE_SUPPORT
case DATA_BSPLINE_CURVE : else if ( object->dataType() == DATA_BSPLINE_CURVE )
return BSplineCurveSelection::getEdgeSelection( PluginFunctions::splineCurve(object) ); return BSplineCurveSelection::getEdgeSelection( PluginFunctions::splineCurve(object) );
break;
#endif #endif
default: else{
emit log(LOGERR,"getEdgeSelection : Unsupported object Type" ); emit log(LOGERR,"getEdgeSelection : Unsupported object Type" );
return idList(0); return idList(0);
} }
......
...@@ -54,14 +54,11 @@ void SelectionPlugin::selectFaces( int objectId , idList _faceList ) { ...@@ -54,14 +54,11 @@ void SelectionPlugin::selectFaces( int objectId , idList _faceList ) {
if ( _faceList.size() == 0 ) if ( _faceList.size() == 0 )
return; return;
switch ( object->dataType( ) ) { if ( object->dataType() == DATA_TRIANGLE_MESH )
case DATA_TRIANGLE_MESH :
MeshSelection::selectFaces(PluginFunctions::triMesh(object), _faceList); MeshSelection::selectFaces(PluginFunctions::triMesh(object), _faceList);
break; else if ( object->dataType() == DATA_POLY_MESH )
case DATA_POLY_MESH :
MeshSelection::selectFaces(PluginFunctions::polyMesh(object), _faceList); MeshSelection::selectFaces(PluginFunctions::polyMesh(object), _faceList);
break; else{
default:
emit log(LOGERR,"selectFaces : Unsupported object Type" ); emit log(LOGERR,"selectFaces : Unsupported object Type" );
return; return;
} }
...@@ -90,14 +87,11 @@ void SelectionPlugin::unselectFaces( int objectId , idList _faceList ) { ...@@ -90,14 +87,11 @@ void SelectionPlugin::unselectFaces( int objectId , idList _faceList ) {
if ( _faceList.size() == 0 ) if ( _faceList.size() == 0 )
return; return;
switch ( object->dataType( ) ) { if ( object->dataType() == DATA_TRIANGLE_MESH )
case DATA_TRIANGLE_MESH :
MeshSelection::unselectFaces(PluginFunctions::triMesh(object), _faceList); MeshSelection::unselectFaces(PluginFunctions::triMesh(object), _faceList);
break; else if ( object->dataType() == DATA_POLY_MESH )
case DATA_POLY_MESH :
MeshSelection::unselectFaces(PluginFunctions::polyMesh(object), _faceList); MeshSelection::unselectFaces(PluginFunctions::polyMesh(object), _faceList);
break; else{
default:
emit log(LOGERR,"unselectFaces : Unsupported object Type" ); emit log(LOGERR,"unselectFaces : Unsupported object Type" );
return; return;
} }
...@@ -124,14 +118,11 @@ void SelectionPlugin::selectAllFaces( int objectId ) ...@@ -124,14 +118,11 @@ void SelectionPlugin::selectAllFaces( int objectId )
return; return;
} }
switch ( object->dataType( ) ) { if ( object->dataType() == DATA_TRIANGLE_MESH )
case DATA_TRIANGLE_MESH :
MeshSelection::selectAllFaces(PluginFunctions::triMesh(object)); MeshSelection::selectAllFaces(PluginFunctions::triMesh(object));
break; else if ( object->dataType() == DATA_POLY_MESH )
case DATA_POLY_MESH :
MeshSelection::selectAllFaces(PluginFunctions::polyMesh(object)); MeshSelection::selectAllFaces(PluginFunctions::polyMesh(object));
break; else{
default:
emit log(LOGERR,"selectAllFaces : Unsupported object Type" ); emit log(LOGERR,"selectAllFaces : Unsupported object Type" );
return; return;
} }
...@@ -150,14 +141,11 @@ void SelectionPlugin::clearFaceSelection( int objectId ) ...@@ -150,14 +141,11 @@ void SelectionPlugin::clearFaceSelection( int objectId )
return; return;
} }
switch ( object->dataType( ) ) { if ( object->dataType() == DATA_TRIANGLE_MESH )
case DATA_TRIANGLE_MESH :
MeshSelection::clearFaceSelection(PluginFunctions::triMesh(object)); MeshSelection::clearFaceSelection(PluginFunctions::triMesh(object));
break; else if ( object->dataType() == DATA_POLY_MESH )
case DATA_POLY_MESH :
MeshSelection::clearFaceSelection(PluginFunctions::polyMesh(object)); MeshSelection::clearFaceSelection(PluginFunctions::polyMesh(object));
break; else{
default:
emit log(LOGERR,"clearFaceSelection : Unsupported object Type" ); emit log(LOGERR,"clearFaceSelection : Unsupported object Type" );
return; return;
} }
...@@ -176,14 +164,11 @@ void SelectionPlugin::invertFaceSelection( int objectId ) ...@@ -176,14 +164,11 @@ void SelectionPlugin::invertFaceSelection( int objectId )
return; return;
} }
switch ( object->dataType( ) ) { if ( object->dataType() == DATA_TRIANGLE_MESH )
case DATA_TRIANGLE_MESH :
MeshSelection::invertFaceSelection(PluginFunctions::triMesh(object)); MeshSelection::invertFaceSelection(PluginFunctions::triMesh(object));
break; else if ( object->dataType() == DATA_POLY_MESH )
case DATA_POLY_MESH :
MeshSelection::invertFaceSelection(PluginFunctions::polyMesh(object)); MeshSelection::invertFaceSelection(PluginFunctions::polyMesh(object));
break; else{
default:
emit log(LOGERR,"invertFaceSelection : Unsupported object Type" ); emit log(LOGERR,"invertFaceSelection : Unsupported object Type" );
return; return;
} }
...@@ -202,14 +187,11 @@ void SelectionPlugin::selectBoundaryFaces( int objectId ) ...@@ -202,14 +187,11 @@ void SelectionPlugin::selectBoundaryFaces( int objectId )
return; return;
} }
switch ( object->dataType( ) ) { if ( object->dataType() == DATA_TRIANGLE_MESH )
case DATA_TRIANGLE_MESH :
MeshSelection::selectBoundaryFaces(PluginFunctions::triMesh(object)); MeshSelection::selectBoundaryFaces(PluginFunctions::triMesh(object));
break; else if ( object->dataType() == DATA_POLY_MESH )
case DATA_POLY_MESH :
MeshSelection::selectBoundaryFaces(PluginFunctions::polyMesh(object)); MeshSelection::selectBoundaryFaces(PluginFunctions::polyMesh(object));
break; else{
default:
emit log(LOGERR,"selectBoundaryFaces : Unsupported object Type" ); emit log(LOGERR,"selectBoundaryFaces : Unsupported object Type" );
return; return;
} }
...@@ -229,14 +211,11 @@ void SelectionPlugin::shrinkFaceSelection( int objectId ) ...@@ -229,14 +211,11 @@ void SelectionPlugin::shrinkFaceSelection( int objectId )
return; return;
} }
switch ( object->dataType( ) ) { if ( object->dataType() == DATA_TRIANGLE_MESH )
case DATA_TRIANGLE_MESH :
MeshSelection::shrinkFaceSelection(PluginFunctions::triMesh(object)); MeshSelection::shrinkFaceSelection(PluginFunctions::triMesh(object));
break; else if ( object->dataType() == DATA_POLY_MESH )
case DATA_POLY_MESH :
MeshSelection::shrinkFaceSelection(PluginFunctions::polyMesh(object)); MeshSelection::shrinkFaceSelection(PluginFunctions::polyMesh(object));
break; else{
default:
emit log(LOGERR,"shrinkFaceSelection : Unsupported object Type" ); emit log(LOGERR,"shrinkFaceSelection : Unsupported object Type" );
return; return;
} }
...@@ -255,14 +234,11 @@ void SelectionPlugin::growFaceSelection( int objectId ) ...@@ -255,14 +234,11 @@ void SelectionPlugin::growFaceSelection( int objectId )
return; return;
} }
switch ( object->dataType( ) ) { if ( object->dataType() == DATA_TRIANGLE_MESH )
case DATA_TRIANGLE_MESH :
MeshSelection::growFaceSelection(PluginFunctions::triMesh(object)); MeshSelection::growFaceSelection(PluginFunctions::triMesh(object));
break; else if ( object->dataType() == DATA_POLY_MESH )
case DATA_POLY_MESH :
MeshSelection::growFaceSelection(PluginFunctions::polyMesh(object)); MeshSelection::growFaceSelection(PluginFunctions::polyMesh(object));
break; else{
default:
emit log(LOGERR,"growFaceSelection : Unsupported object Type" ); emit log(LOGERR,"growFaceSelection : Unsupported object Type" );
return; return;
} }
...@@ -283,14 +259,11 @@ idList SelectionPlugin::getFaceSelection( int objectId ) ...@@ -283,14 +259,11 @@ idList SelectionPlugin::getFaceSelection( int objectId )
emit scriptInfo( "getFaceSelection( ObjectId )" ); emit scriptInfo( "getFaceSelection( ObjectId )" );
switch ( object->dataType( ) ) { if ( object->dataType() == DATA_TRIANGLE_MESH )
case DATA_TRIANGLE_MESH :
return MeshSelection::getFaceSelection(PluginFunctions::triMesh(object)); return MeshSelection::getFaceSelection(PluginFunctions::triMesh(object));
break; else if ( object->dataType() == DATA_POLY_MESH )
case DATA_POLY_MESH :
return MeshSelection::getFaceSelection(PluginFunctions::polyMesh(object)); return MeshSelection::getFaceSelection(PluginFunctions::polyMesh(object));
break; else{
default:
emit log(LOGERR,"getFaceSelection : Unsupported object Type" ); emit log(LOGERR,"getFaceSelection : Unsupported object Type" );
return idList(0); return idList(0);
} }
......
...@@ -54,16 +54,13 @@ void SelectionPlugin::selectHandleVertices( int objectId , idList _vertexList ) ...@@ -54,16 +54,13 @@ void SelectionPlugin::selectHandleVertices( int objectId , idList _vertexList )
if ( _vertexList.size() == 0 ) if ( _vertexList.size() == 0 )
return; return;
switch ( object->dataType( ) ) { if ( object->dataType() == DATA_TRIANGLE_MESH ){
case DATA_TRIANGLE_MESH :
MeshSelection::setArea(PluginFunctions::triMesh(object) , _vertexList , HANDLEAREA, true); MeshSelection::setArea(PluginFunctions::triMesh(object) , _vertexList , HANDLEAREA, true);
update_regions( PluginFunctions::triMesh(object) ); update_regions( PluginFunctions::triMesh(object) );
break; } else if ( object->dataType() == DATA_POLY_MESH ){
case DATA_POLY_MESH :
MeshSelection::setArea(PluginFunctions::polyMesh(object) , _vertexList , HANDLEAREA, true); MeshSelection::setArea(PluginFunctions::polyMesh(object) , _vertexList , HANDLEAREA, true);
update_regions( PluginFunctions::polyMesh(object) ); update_regions( PluginFunctions::polyMesh(object) );
break; } else {
default:
emit log(LOGERR,"selectHandleVertices : Unsupported object Type" ); emit log(LOGERR,"selectHandleVertices : Unsupported object Type" );
return; return;
} }
...@@ -92,14 +89,11 @@ void SelectionPlugin::unselectHandleVertices( int objectId , idList _vertexList ...@@ -92,14 +89,11 @@ void SelectionPlugin::unselectHandleVertices( int objectId , idList _vertexList
if ( _vertexList.size() == 0 ) if ( _vertexList.size() == 0 )
return; return;
switch ( object->dataType( ) ) { if ( object->dataType() == DATA_TRIANGLE_MESH )
case DATA_TRIANGLE_MESH :
MeshSelection::setArea(PluginFunctions::triMesh(object) , _vertexList , HANDLEAREA, false); MeshSelection::setArea(PluginFunctions::triMesh(object) , _vertexList , HANDLEAREA, false);
break; else if ( object->dataType() == DATA_POLY_MESH )
case DATA_POLY_MESH :
MeshSelection::setArea(PluginFunctions::polyMesh(object) , _vertexList , HANDLEAREA, false); MeshSelection::setArea(PluginFunctions::polyMesh(object) , _vertexList , HANDLEAREA, false);
break; else {
default:
emit log(LOGERR,"unselectHandleVertices : Unsupported object Type" ); emit log(LOGERR,"unselectHandleVertices : Unsupported object Type" );
return; return;
} }
...@@ -125,14 +119,11 @@ void SelectionPlugin::clearHandleVertices( int objectId ) { ...@@ -125,14 +119,11 @@ void SelectionPlugin::clearHandleVertices( int objectId ) {
return; return;
} }
switch ( object->dataType( ) ) { if ( object->dataType() == DATA_TRIANGLE_MESH )
case DATA_TRIANGLE_MESH :
MeshSelection::setArea(PluginFunctions::triMesh(object) , HANDLEAREA, false); MeshSelection::setArea(PluginFunctions::triMesh(object) , HANDLEAREA, false);
break; else if ( object->dataType() == DATA_POLY_MESH )
case DATA_POLY_MESH :
MeshSelection::setArea(PluginFunctions::polyMesh(object) , HANDLEAREA, false); MeshSelection::setArea(PluginFunctions::polyMesh(object) , HANDLEAREA, false);
break; else {
default:
emit log(LOGERR,"clearHandleVertices : Unsupported object Type" ); emit log(LOGERR,"clearHandleVertices : Unsupported object Type" );
return; return;
} }
...@@ -150,14 +141,11 @@ void SelectionPlugin::setAllHandleVertices( int objectId ) { ...@@ -150,14 +141,11 @@ void SelectionPlugin::setAllHandleVertices( int objectId ) {
return; return;
} }
switch ( object->dataType( ) ) { if ( object->dataType() == DATA_TRIANGLE_MESH )
case DATA_TRIANGLE_MESH :
MeshSelection::setArea(PluginFunctions::triMesh(object) , HANDLEAREA, true); MeshSelection::setArea(PluginFunctions::triMesh(object) , HANDLEAREA, true);
break; else if ( object->dataType() == DATA_POLY_MESH )
case DATA_POLY_MESH :
MeshSelection::setArea(PluginFunctions::polyMesh(object) , HANDLEAREA, true); MeshSelection::setArea(PluginFunctions::polyMesh(object) , HANDLEAREA, true);
break; else {
default:
emit log(LOGERR,"setAllHandleVertices : Unsupported object Type" ); emit log(LOGERR,"setAllHandleVertices : Unsupported object Type" );
return; return;
} }
...@@ -177,14 +165,11 @@ idList SelectionPlugin::getHandleVertices( int objectId ) { ...@@ -177,14 +165,11 @@ idList SelectionPlugin::getHandleVertices( int objectId ) {
emit scriptInfo( "getHandleVertices( ObjectId )" ); emit scriptInfo( "getHandleVertices( ObjectId )" );
switch ( object->dataType( ) ) { if ( object->dataType() == DATA_TRIANGLE_MESH )