Commit 33bef1a7 authored by Isaak Lim's avatar Isaak Lim

added objectId to emitted scriptinfo for MeshSelection

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@16180 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 2be7279a
...@@ -71,7 +71,7 @@ void MeshObjectSelectionPlugin::selectEdges( int objectId , IdList _edgeList ) { ...@@ -71,7 +71,7 @@ void MeshObjectSelectionPlugin::selectEdges( int objectId , IdList _edgeList ) {
return; return;
} }
QString selection = "selectEdges( ObjectId , [ " + QString::number(_edgeList[0]); QString selection = "selectEdges( ObjectId(" + QString::number(objectId) + ") , [ " + QString::number(_edgeList[0]);
for ( uint i = 1 ; i < _edgeList.size(); ++i) { for ( uint i = 1 ; i < _edgeList.size(); ++i) {
selection += " , " + QString::number(_edgeList[i]); selection += " , " + QString::number(_edgeList[i]);
...@@ -104,7 +104,7 @@ void MeshObjectSelectionPlugin::unselectEdges( int objectId , IdList _edgeList ) ...@@ -104,7 +104,7 @@ void MeshObjectSelectionPlugin::unselectEdges( int objectId , IdList _edgeList )
return; return;
} }
QString selection = "unselectVertices( ObjectId , [ " + QString::number(_edgeList[0]); QString selection = "unselectVertices( ObjectId(" + QString::number(objectId) +") , [ " + QString::number(_edgeList[0]);
for ( uint i = 1 ; i < _edgeList.size(); ++i) { for ( uint i = 1 ; i < _edgeList.size(); ++i) {
selection += " , " + QString::number(_edgeList[i]); selection += " , " + QString::number(_edgeList[i]);
...@@ -136,7 +136,7 @@ void MeshObjectSelectionPlugin::selectAllEdges( int objectId ) { ...@@ -136,7 +136,7 @@ void MeshObjectSelectionPlugin::selectAllEdges( int objectId ) {
} }
emit updatedObject(object->id(), UPDATE_SELECTION_EDGES); emit updatedObject(object->id(), UPDATE_SELECTION_EDGES);
emit scriptInfo( "selectAllEdges( ObjectId )" ); emit scriptInfo( "selectAllEdges( ObjectId(" + QString::number(objectId) + ") )" );
} }
//========================================================= //=========================================================
...@@ -159,7 +159,7 @@ void MeshObjectSelectionPlugin::clearEdgeSelection( int objectId ) { ...@@ -159,7 +159,7 @@ void MeshObjectSelectionPlugin::clearEdgeSelection( int objectId ) {
} }
emit updatedObject(object->id(), UPDATE_SELECTION_EDGES); emit updatedObject(object->id(), UPDATE_SELECTION_EDGES);
emit scriptInfo( "clearEdgeSelection( ObjectId )" ); emit scriptInfo( "clearEdgeSelection( ObjectId(" + QString::number(objectId) + ") )" );
} }
//========================================================= //=========================================================
...@@ -182,7 +182,7 @@ void MeshObjectSelectionPlugin::invertEdgeSelection( int objectId ) { ...@@ -182,7 +182,7 @@ void MeshObjectSelectionPlugin::invertEdgeSelection( int objectId ) {
} }
emit updatedObject(object->id(), UPDATE_SELECTION_EDGES); emit updatedObject(object->id(), UPDATE_SELECTION_EDGES);
emit scriptInfo( "invertEdgeSelection( ObjectId )" ); emit scriptInfo( "invertEdgeSelection( ObjectId(" + QString::number(objectId) + ") )" );
} }
//========================================================= //=========================================================
...@@ -205,7 +205,7 @@ void MeshObjectSelectionPlugin::selectBoundaryEdges( int objectId ) { ...@@ -205,7 +205,7 @@ void MeshObjectSelectionPlugin::selectBoundaryEdges( int objectId ) {
} }
emit updatedObject(object->id(), UPDATE_SELECTION_EDGES); emit updatedObject(object->id(), UPDATE_SELECTION_EDGES);
emit scriptInfo( "selectBoundaryEdges( ObjectId )" ); emit scriptInfo( "selectBoundaryEdges( ObjectId(" + QString::number(objectId) + ") )" );
} }
//========================================================= //=========================================================
...@@ -228,7 +228,7 @@ void MeshObjectSelectionPlugin::deleteEdgeSelection(int _objectId) { ...@@ -228,7 +228,7 @@ void MeshObjectSelectionPlugin::deleteEdgeSelection(int _objectId) {
} }
emit updatedObject(object->id(), UPDATE_ALL); emit updatedObject(object->id(), UPDATE_ALL);
emit scriptInfo("deleteEdgeSelection(ObjectId)"); emit scriptInfo("deleteEdgeSelection(ObjectId(" + QString::number(_objectId) + "))");
} }
//========================================================= //=========================================================
...@@ -247,7 +247,7 @@ IdList MeshObjectSelectionPlugin::getEdgeSelection( int objectId ) { ...@@ -247,7 +247,7 @@ IdList MeshObjectSelectionPlugin::getEdgeSelection( int objectId ) {
return IdList(0); return IdList(0);
} }
emit scriptInfo( "getEdgeSelection( ObjectId )" ); emit scriptInfo( "getEdgeSelection( ObjectId(" + QString::number(objectId) + ") )" );
if ( object->dataType() == DATA_TRIANGLE_MESH ) if ( object->dataType() == DATA_TRIANGLE_MESH )
return MeshSelection::getEdgeSelection(PluginFunctions::triMesh(object)); return MeshSelection::getEdgeSelection(PluginFunctions::triMesh(object));
...@@ -392,7 +392,7 @@ void MeshObjectSelectionPlugin::colorizeEdgeSelection(int objectId, int r, int g ...@@ -392,7 +392,7 @@ void MeshObjectSelectionPlugin::colorizeEdgeSelection(int objectId, int r, int g
return; return;
} }
emit scriptInfo( "colorizeEdgeSelection( ObjectId, " emit scriptInfo( "colorizeEdgeSelection( ObjectId(" + QString::number(objectId) + "), "
+ QString::number(r) + ", " + QString::number(g) + ", " + QString::number(b) + " )" ); + QString::number(r) + ", " + QString::number(g) + ", " + QString::number(b) + " )" );
emit updatedObject(object->id(), UPDATE_COLOR); emit updatedObject(object->id(), UPDATE_COLOR);
......
...@@ -72,7 +72,7 @@ void MeshObjectSelectionPlugin::selectFaces(int objectId , IdList _faceList) { ...@@ -72,7 +72,7 @@ void MeshObjectSelectionPlugin::selectFaces(int objectId , IdList _faceList) {
return; return;
} }
QString selection = "selectFaces(ObjectId , [ " + QString::number(_faceList[0]); QString selection = "selectFaces(ObjectId(" + QString::number(objectId) + ") , [ " + QString::number(_faceList[0]);
for (uint i = 1 ; i < _faceList.size(); ++i) { for (uint i = 1 ; i < _faceList.size(); ++i) {
selection += " , " + QString::number(_faceList[i]); selection += " , " + QString::number(_faceList[i]);
...@@ -105,7 +105,7 @@ void MeshObjectSelectionPlugin::unselectFaces(int objectId , IdList _faceList) { ...@@ -105,7 +105,7 @@ void MeshObjectSelectionPlugin::unselectFaces(int objectId , IdList _faceList) {
return; return;
} }
QString selection = "unselectFaces(ObjectId , [ " + QString::number(_faceList[0]); QString selection = "unselectFaces(ObjectId(" + QString::number(objectId) + ") , [ " + QString::number(_faceList[0]);
for (uint i = 1 ; i < _faceList.size(); ++i) { for (uint i = 1 ; i < _faceList.size(); ++i) {
selection += " , " + QString::number(_faceList[i]); selection += " , " + QString::number(_faceList[i]);
...@@ -137,7 +137,7 @@ void MeshObjectSelectionPlugin::selectAllFaces(int objectId) { ...@@ -137,7 +137,7 @@ void MeshObjectSelectionPlugin::selectAllFaces(int objectId) {
} }
emit updatedObject(object->id(), UPDATE_SELECTION_FACES); emit updatedObject(object->id(), UPDATE_SELECTION_FACES);
emit scriptInfo("selectAllFaces(ObjectId)"); emit scriptInfo("selectAllFaces(ObjectId(" + QString::number(objectId) + "))");
} }
//========================================================= //=========================================================
...@@ -160,7 +160,7 @@ void MeshObjectSelectionPlugin::clearFaceSelection(int objectId) { ...@@ -160,7 +160,7 @@ void MeshObjectSelectionPlugin::clearFaceSelection(int objectId) {
} }
emit updatedObject(object->id(), UPDATE_SELECTION_FACES); emit updatedObject(object->id(), UPDATE_SELECTION_FACES);
emit scriptInfo("clearFaceSelection(ObjectId)"); emit scriptInfo("clearFaceSelection(ObjectId(" + QString::number(objectId) + "))");
} }
//========================================================= //=========================================================
...@@ -183,7 +183,7 @@ void MeshObjectSelectionPlugin::invertFaceSelection(int objectId) { ...@@ -183,7 +183,7 @@ void MeshObjectSelectionPlugin::invertFaceSelection(int objectId) {
} }
emit updatedObject(object->id(), UPDATE_SELECTION_FACES); emit updatedObject(object->id(), UPDATE_SELECTION_FACES);
emit scriptInfo("invertFaceSelection(ObjectId)"); emit scriptInfo("invertFaceSelection(ObjectId(" + QString::number(objectId) + "))");
} }
//========================================================= //=========================================================
...@@ -206,7 +206,7 @@ void MeshObjectSelectionPlugin::deleteFaceSelection(int _objectId) { ...@@ -206,7 +206,7 @@ void MeshObjectSelectionPlugin::deleteFaceSelection(int _objectId) {
} }
emit updatedObject(object->id(), UPDATE_ALL); emit updatedObject(object->id(), UPDATE_ALL);
emit scriptInfo("deleteFaceSelection(ObjectId)"); emit scriptInfo("deleteFaceSelection(ObjectId(" + QString::number(_objectId) + "))");
} }
//========================================================= //=========================================================
...@@ -235,7 +235,7 @@ void MeshObjectSelectionPlugin::selectBoundaryFaces(int objectId) { ...@@ -235,7 +235,7 @@ void MeshObjectSelectionPlugin::selectBoundaryFaces(int objectId) {
} }
emit updatedObject(object->id(), UPDATE_SELECTION_FACES); emit updatedObject(object->id(), UPDATE_SELECTION_FACES);
emit scriptInfo("selectBoundaryFaces(ObjectId)"); emit scriptInfo("selectBoundaryFaces(ObjectId(" + QString::number(objectId) + "))");
} }
...@@ -259,7 +259,7 @@ void MeshObjectSelectionPlugin::shrinkFaceSelection(int objectId) { ...@@ -259,7 +259,7 @@ void MeshObjectSelectionPlugin::shrinkFaceSelection(int objectId) {
} }
emit updatedObject(object->id(), UPDATE_SELECTION_FACES); emit updatedObject(object->id(), UPDATE_SELECTION_FACES);
emit scriptInfo("shrinkFaceSelection(ObjectId)"); emit scriptInfo("shrinkFaceSelection(ObjectId(" + QString::number(objectId) + "))");
} }
//========================================================= //=========================================================
...@@ -282,7 +282,7 @@ void MeshObjectSelectionPlugin::growFaceSelection(int objectId) { ...@@ -282,7 +282,7 @@ void MeshObjectSelectionPlugin::growFaceSelection(int objectId) {
} }
emit updatedObject(object->id(), UPDATE_SELECTION_FACES); emit updatedObject(object->id(), UPDATE_SELECTION_FACES);
emit scriptInfo("growFaceSelection(ObjectId)"); emit scriptInfo("growFaceSelection(ObjectId(" + QString::number(objectId) + "))");
} }
//========================================================= //=========================================================
...@@ -295,7 +295,7 @@ IdList MeshObjectSelectionPlugin::getFaceSelection(int objectId) { ...@@ -295,7 +295,7 @@ IdList MeshObjectSelectionPlugin::getFaceSelection(int objectId) {
return IdList(0); return IdList(0);
} }
emit scriptInfo("getFaceSelection(ObjectId)"); emit scriptInfo("getFaceSelection(ObjectId(" + QString::number(objectId) + "))");
if (object->dataType() == DATA_TRIANGLE_MESH) if (object->dataType() == DATA_TRIANGLE_MESH)
return MeshSelection::getFaceSelection(PluginFunctions::triMesh(object)); return MeshSelection::getFaceSelection(PluginFunctions::triMesh(object));
...@@ -328,7 +328,7 @@ void MeshObjectSelectionPlugin::colorizeFaceSelection(int objectId, int r, int g ...@@ -328,7 +328,7 @@ void MeshObjectSelectionPlugin::colorizeFaceSelection(int objectId, int r, int g
} }
emit scriptInfo("colorizeFaceSelection(ObjectId, " emit scriptInfo("colorizeFaceSelection(ObjectId(" + QString::number(objectId) + "), "
+ QString::number(r) + ", " + QString::number(g) + ", " + QString::number(b) + ")"); + QString::number(r) + ", " + QString::number(g) + ", " + QString::number(b) + ")");
emit updatedObject(objectId, UPDATE_COLOR); emit updatedObject(objectId, UPDATE_COLOR);
......
...@@ -71,7 +71,7 @@ void MeshObjectSelectionPlugin::selectHalfedges(int objectId , IdList _halfedgeL ...@@ -71,7 +71,7 @@ void MeshObjectSelectionPlugin::selectHalfedges(int objectId , IdList _halfedgeL
return; return;
} }
QString selection = "selectHalfedges(ObjectId , [ " + QString::number(_halfedgeList[0]); QString selection = "selectHalfedges(ObjectId(" + QString::number(objectId) + ") , [ " + QString::number(_halfedgeList[0]);
for (uint i = 1 ; i < _halfedgeList.size(); ++i) { for (uint i = 1 ; i < _halfedgeList.size(); ++i) {
selection += " , " + QString::number(_halfedgeList[i]); selection += " , " + QString::number(_halfedgeList[i]);
...@@ -104,7 +104,7 @@ void MeshObjectSelectionPlugin::unselectHalfedges(int objectId , IdList _halfedg ...@@ -104,7 +104,7 @@ void MeshObjectSelectionPlugin::unselectHalfedges(int objectId , IdList _halfedg
return; return;
} }
QString selection = "unselectVertices(ObjectId , [ " + QString::number(_halfedgeList[0]); QString selection = "unselectVertices(ObjectId(" + QString::number(objectId) + ") , [ " + QString::number(_halfedgeList[0]);
for (uint i = 1 ; i < _halfedgeList.size(); ++i) { for (uint i = 1 ; i < _halfedgeList.size(); ++i) {
selection += " , " + QString::number(_halfedgeList[i]); selection += " , " + QString::number(_halfedgeList[i]);
...@@ -136,7 +136,7 @@ void MeshObjectSelectionPlugin::selectAllHalfedges(int objectId) { ...@@ -136,7 +136,7 @@ void MeshObjectSelectionPlugin::selectAllHalfedges(int objectId) {
} }
emit updatedObject(object->id(), UPDATE_SELECTION_EDGES); emit updatedObject(object->id(), UPDATE_SELECTION_EDGES);
emit scriptInfo("selectAllHalfedges(ObjectId)"); emit scriptInfo("selectAllHalfedges(ObjectId(" + QString::number(objectId) + "))");
} }
//========================================================= //=========================================================
...@@ -159,7 +159,7 @@ void MeshObjectSelectionPlugin::clearHalfedgeSelection(int objectId) { ...@@ -159,7 +159,7 @@ void MeshObjectSelectionPlugin::clearHalfedgeSelection(int objectId) {
} }
emit updatedObject(object->id(), UPDATE_SELECTION_EDGES); emit updatedObject(object->id(), UPDATE_SELECTION_EDGES);
emit scriptInfo("clearHalfedgeSelection(ObjectId)"); emit scriptInfo("clearHalfedgeSelection(ObjectId(" + QString::number(objectId) + "))");
} }
//========================================================= //=========================================================
...@@ -182,7 +182,7 @@ void MeshObjectSelectionPlugin::invertHalfedgeSelection(int objectId) { ...@@ -182,7 +182,7 @@ void MeshObjectSelectionPlugin::invertHalfedgeSelection(int objectId) {
} }
emit updatedObject(object->id(), UPDATE_SELECTION_EDGES); emit updatedObject(object->id(), UPDATE_SELECTION_EDGES);
emit scriptInfo("invertHalfedgeSelection(ObjectId)"); emit scriptInfo("invertHalfedgeSelection(ObjectId(" + QString::number(objectId) + "))");
} }
//========================================================= //=========================================================
...@@ -205,7 +205,7 @@ void MeshObjectSelectionPlugin::selectBoundaryHalfedges(int objectId) { ...@@ -205,7 +205,7 @@ void MeshObjectSelectionPlugin::selectBoundaryHalfedges(int objectId) {
} }
emit updatedObject(object->id(), UPDATE_SELECTION_EDGES); emit updatedObject(object->id(), UPDATE_SELECTION_EDGES);
emit scriptInfo("selectBoundaryHalfedges(ObjectId)"); emit scriptInfo("selectBoundaryHalfedges(ObjectId(" + QString::number(objectId) + "))");
} }
//========================================================= //=========================================================
...@@ -218,7 +218,7 @@ IdList MeshObjectSelectionPlugin::getHalfedgeSelection(int objectId) { ...@@ -218,7 +218,7 @@ IdList MeshObjectSelectionPlugin::getHalfedgeSelection(int objectId) {
return IdList(0); return IdList(0);
} }
emit scriptInfo("getHalfedgeSelection(ObjectId)"); emit scriptInfo("getHalfedgeSelection(ObjectId(" + QString::number(objectId) + "))");
if (object->dataType() == DATA_TRIANGLE_MESH) if (object->dataType() == DATA_TRIANGLE_MESH)
return MeshSelection::getHalfedgeSelection(PluginFunctions::triMesh(object)); return MeshSelection::getHalfedgeSelection(PluginFunctions::triMesh(object));
...@@ -364,7 +364,7 @@ void MeshObjectSelectionPlugin::colorizeHalfedgeSelection(int objectId, int r, i ...@@ -364,7 +364,7 @@ void MeshObjectSelectionPlugin::colorizeHalfedgeSelection(int objectId, int r, i
return; return;
} }
emit scriptInfo("colorizeHalfedgeSelection(ObjectId, " emit scriptInfo("colorizeHalfedgeSelection(ObjectId(" + QString::number(objectId) + "), "
+ QString::number(r) + ", " + QString::number(g) + ", " + QString::number(b) + ")"); + QString::number(r) + ", " + QString::number(g) + ", " + QString::number(b) + ")");
emit updatedObject(object->id(), UPDATE_COLOR); emit updatedObject(object->id(), UPDATE_COLOR);
......
...@@ -1063,7 +1063,7 @@ void MeshObjectSelectionPlugin::slotToggleSelection(QMouseEvent* _event, Selecti ...@@ -1063,7 +1063,7 @@ void MeshObjectSelectionPlugin::slotToggleSelection(QMouseEvent* _event, Selecti
if (PluginFunctions::scenegraphPick(ACG::SceneGraph::PICK_FACE, _event->pos(),node_idx, target_idx, &hit_point)) { if (PluginFunctions::scenegraphPick(ACG::SceneGraph::PICK_FACE, _event->pos(),node_idx, target_idx, &hit_point)) {
if (object->dataType(DATA_TRIANGLE_MESH)) { if (object->dataType(DATA_TRIANGLE_MESH)) {
toggleMeshSelection(PluginFunctions::triMesh(object), target_idx, hit_point, _currentType); toggleMeshSelection(object->id(), PluginFunctions::triMesh(object), target_idx, hit_point, _currentType);
} }
} }
} else if (object->dataType() == DATA_POLY_MESH) { } else if (object->dataType() == DATA_POLY_MESH) {
...@@ -1071,7 +1071,7 @@ void MeshObjectSelectionPlugin::slotToggleSelection(QMouseEvent* _event, Selecti ...@@ -1071,7 +1071,7 @@ void MeshObjectSelectionPlugin::slotToggleSelection(QMouseEvent* _event, Selecti
if (PluginFunctions::scenegraphPick(ACG::SceneGraph::PICK_FACE, _event->pos(),node_idx, target_idx, &hit_point)) { if (PluginFunctions::scenegraphPick(ACG::SceneGraph::PICK_FACE, _event->pos(),node_idx, target_idx, &hit_point)) {
if (object->dataType(DATA_POLY_MESH)) { if (object->dataType(DATA_POLY_MESH)) {
toggleMeshSelection(PluginFunctions::polyMesh(object), target_idx, hit_point, _currentType); toggleMeshSelection(object->id(), PluginFunctions::polyMesh(object), target_idx, hit_point, _currentType);
} }
} }
} }
......
...@@ -463,7 +463,7 @@ private: ...@@ -463,7 +463,7 @@ private:
/// Toggle mesh selection /// Toggle mesh selection
template<typename MeshT> template<typename MeshT>
void toggleMeshSelection(MeshT* _mesh, uint _fh, ACG::Vec3d& _hit_point, PrimitiveType _primitiveType); void toggleMeshSelection(int _objectId, MeshT* _mesh, uint _fh, ACG::Vec3d& _hit_point, PrimitiveType _primitiveType);
/// Use the event to paint selection with a sphere /// Use the event to paint selection with a sphere
template<typename MeshT> template<typename MeshT>
......
...@@ -143,7 +143,7 @@ void MeshObjectSelectionPlugin::update_regions(MeshType* _mesh) { ...@@ -143,7 +143,7 @@ void MeshObjectSelectionPlugin::update_regions(MeshType* _mesh) {
* @param _primitiveType primitive types to be selected * @param _primitiveType primitive types to be selected
*/ */
template<class MeshT> template<class MeshT>
void MeshObjectSelectionPlugin::toggleMeshSelection(MeshT* _mesh, uint _fh, ACG::Vec3d& _hit_point, PrimitiveType _primitiveType) { void MeshObjectSelectionPlugin::toggleMeshSelection(int _objectId, MeshT* _mesh, uint _fh, ACG::Vec3d& _hit_point, PrimitiveType _primitiveType) {
typename MeshT::FaceHandle fh = _mesh->face_handle(_fh); typename MeshT::FaceHandle fh = _mesh->face_handle(_fh);
...@@ -170,9 +170,9 @@ void MeshObjectSelectionPlugin::toggleMeshSelection(MeshT* _mesh, uint _fh, ACG: ...@@ -170,9 +170,9 @@ void MeshObjectSelectionPlugin::toggleMeshSelection(MeshT* _mesh, uint _fh, ACG:
_mesh->status(closest).set_selected(!_mesh->status(closest).selected()); _mesh->status(closest).set_selected(!_mesh->status(closest).selected());
if(_mesh->status(closest).selected()) if(_mesh->status(closest).selected())
emit scriptInfo("selectVertices(ObjectId , [" + QString::number(closest.idx())+ "])"); emit scriptInfo("selectVertices(ObjectId(" + QString::number(_objectId) + ") , [" + QString::number(closest.idx())+ "])");
else else
emit scriptInfo("unselectVertices(ObjectId , [" + QString::number(closest.idx())+ "])"); emit scriptInfo("unselectVertices(ObjectId(" + QString::number(_objectId) + ") , [" + QString::number(closest.idx())+ "])");
} }
//Edge Selection //Edge Selection
...@@ -210,16 +210,16 @@ void MeshObjectSelectionPlugin::toggleMeshSelection(MeshT* _mesh, uint _fh, ACG: ...@@ -210,16 +210,16 @@ void MeshObjectSelectionPlugin::toggleMeshSelection(MeshT* _mesh, uint _fh, ACG:
_mesh->status(closest_eh).set_selected(!_mesh->status(closest_eh).selected()); _mesh->status(closest_eh).set_selected(!_mesh->status(closest_eh).selected());
if(_mesh->status(closest_eh).selected()) if(_mesh->status(closest_eh).selected())
emit scriptInfo("selectEdges(ObjectId , [" + QString::number(closest_eh.idx())+ "])"); emit scriptInfo("selectEdges(ObjectId(" + QString::number(_objectId) + ") , [" + QString::number(closest_eh.idx())+ "])");
else else
emit scriptInfo("unselectEdges(ObjectId , [" + QString::number(closest_eh.idx())+ "])"); emit scriptInfo("unselectEdges(ObjectId(" + QString::number(_objectId) + ") , [" + QString::number(closest_eh.idx())+ "])");
} else { } else {
_mesh->status(closest).set_selected(!_mesh->status(closest).selected()); _mesh->status(closest).set_selected(!_mesh->status(closest).selected());
if(_mesh->status(closest).selected()) if(_mesh->status(closest).selected())
emit scriptInfo("selectHalfedges(ObjectId , [" + QString::number(closest.idx())+ "])"); emit scriptInfo("selectHalfedges(ObjectId(" + QString::number(_objectId) + ") , [" + QString::number(closest.idx())+ "])");
else else
emit scriptInfo("unselectHalfedges(ObjectId , [" + QString::number(closest.idx())+ "])"); emit scriptInfo("unselectHalfedges(ObjectId(" + QString::number(_objectId) + ") , [" + QString::number(closest.idx())+ "])");
} }
} }
...@@ -228,9 +228,9 @@ void MeshObjectSelectionPlugin::toggleMeshSelection(MeshT* _mesh, uint _fh, ACG: ...@@ -228,9 +228,9 @@ void MeshObjectSelectionPlugin::toggleMeshSelection(MeshT* _mesh, uint _fh, ACG:
_mesh->status(fh).set_selected(!_mesh->status(fh).selected()); _mesh->status(fh).set_selected(!_mesh->status(fh).selected());
if(_mesh->status(fh).selected()) if(_mesh->status(fh).selected())
emit scriptInfo("selectFaces(ObjectId , [" + QString::number(fh.idx())+ "])"); emit scriptInfo("selectFaces(ObjectId(" + QString::number(_objectId) + ") , [" + QString::number(fh.idx())+ "])");
else else
emit scriptInfo("unselectFaces(ObjectId , [" + QString::number(fh.idx())+ "])"); emit scriptInfo("unselectFaces(ObjectId(" + QString::number(_objectId) + ") , [" + QString::number(fh.idx())+ "])");
} }
} }
......
...@@ -71,7 +71,7 @@ void MeshObjectSelectionPlugin::selectVertices(int _objectId, IdList _vertexList ...@@ -71,7 +71,7 @@ void MeshObjectSelectionPlugin::selectVertices(int _objectId, IdList _vertexList
return; return;
} }
QString selection = "selectVertices(ObjectId, [ " + QString::number(_vertexList[0]); QString selection = "selectVertices(ObjectId(" + QString::number(_objectId) + "), [ " + QString::number(_vertexList[0]);
for (uint i = 1 ; i < _vertexList.size(); ++i) { for (uint i = 1 ; i < _vertexList.size(); ++i) {
selection += ", " + QString::number(_vertexList[i]); selection += ", " + QString::number(_vertexList[i]);
...@@ -104,7 +104,7 @@ void MeshObjectSelectionPlugin::unselectVertices(int _objectId, IdList _vertexLi ...@@ -104,7 +104,7 @@ void MeshObjectSelectionPlugin::unselectVertices(int _objectId, IdList _vertexLi
return; return;
} }
QString selection = "unselectVertices(ObjectId, [ " + QString::number(_vertexList[0]); QString selection = "unselectVertices(ObjectId(" + QString::number(_objectId) + "), [ " + QString::number(_vertexList[0]);
for (uint i = 1 ; i < _vertexList.size(); ++i) { for (uint i = 1 ; i < _vertexList.size(); ++i) {
selection += ", " + QString::number(_vertexList[i]); selection += ", " + QString::number(_vertexList[i]);
...@@ -138,7 +138,7 @@ void MeshObjectSelectionPlugin::selectAllVertices(int _objectId) { ...@@ -138,7 +138,7 @@ void MeshObjectSelectionPlugin::selectAllVertices(int _objectId) {
} }
emit updatedObject(object->id(), UPDATE_SELECTION_VERTICES); emit updatedObject(object->id(), UPDATE_SELECTION_VERTICES);
emit scriptInfo("selectAllVertices(ObjectId)"); emit scriptInfo("selectAllVertices(ObjectId(" + QString::number(_objectId) + "))");
} }
//========================================================= //=========================================================
...@@ -161,7 +161,7 @@ void MeshObjectSelectionPlugin::clearVertexSelection(int _objectId) { ...@@ -161,7 +161,7 @@ void MeshObjectSelectionPlugin::clearVertexSelection(int _objectId) {
} }
emit updatedObject(object->id(), UPDATE_SELECTION_VERTICES); emit updatedObject(object->id(), UPDATE_SELECTION_VERTICES);
emit scriptInfo("clearVertexSelection(ObjectId)"); emit scriptInfo("clearVertexSelection(ObjectId(" + QString::number(_objectId) + "))");
} }
//========================================================= //=========================================================
...@@ -184,7 +184,7 @@ void MeshObjectSelectionPlugin::invertVertexSelection(int _objectId) { ...@@ -184,7 +184,7 @@ void MeshObjectSelectionPlugin::invertVertexSelection(int _objectId) {
} }
emit updatedObject(object->id(), UPDATE_SELECTION_VERTICES); emit updatedObject(object->id(), UPDATE_SELECTION_VERTICES);
emit scriptInfo("invertVertexSelection(ObjectId)"); emit scriptInfo("invertVertexSelection(ObjectId(" + QString::number(_objectId) + "))");
} }
//========================================================= //=========================================================
...@@ -207,7 +207,7 @@ void MeshObjectSelectionPlugin::selectBoundaryVertices(int _objectId) { ...@@ -207,7 +207,7 @@ void MeshObjectSelectionPlugin::selectBoundaryVertices(int _objectId) {
} }
emit updatedObject(object->id(), UPDATE_SELECTION_VERTICES); emit updatedObject(object->id(), UPDATE_SELECTION_VERTICES);
emit scriptInfo("selectBoundaryVertices(ObjectId)"); emit scriptInfo("selectBoundaryVertices(ObjectId(" + QString::number(_objectId) + "))");
} }
//========================================================= //=========================================================
...@@ -230,7 +230,7 @@ void MeshObjectSelectionPlugin::selectClosestBoundaryVertices(int _objectId, int ...@@ -230,7 +230,7 @@ void MeshObjectSelectionPlugin::selectClosestBoundaryVertices(int _objectId, int
} }
emit updatedObject(object->id(), UPDATE_SELECTION_VERTICES); emit updatedObject(object->id(), UPDATE_SELECTION_VERTICES);
emit scriptInfo("selectClosestBoundaryVertices(ObjectId, VertexId)"); emit scriptInfo("selectClosestBoundaryVertices(ObjectId(" + QString::number(_objectId) + "), VertexId)");
} }
//========================================================= //=========================================================
...@@ -253,7 +253,7 @@ void MeshObjectSelectionPlugin::shrinkVertexSelection(int _objectId) { ...@@ -253,7 +253,7 @@ void MeshObjectSelectionPlugin::shrinkVertexSelection(int _objectId) {
} }
emit updatedObject(object->id(), UPDATE_SELECTION_VERTICES); emit updatedObject(object->id(), UPDATE_SELECTION_VERTICES);
emit scriptInfo("shrinkVertexSelection(ObjectId)"); emit scriptInfo("shrinkVertexSelection(ObjectId(" + QString::number(_objectId) + "))");
} }
//========================================================= //=========================================================
...@@ -276,7 +276,7 @@ void MeshObjectSelectionPlugin::growVertexSelection(int _objectId) { ...@@ -276,7 +276,7 @@ void MeshObjectSelectionPlugin::growVertexSelection(int _objectId) {
} }
emit updatedObject(object->id(), UPDATE_SELECTION_VERTICES); emit updatedObject(object->id(), UPDATE_SELECTION_VERTICES);
emit scriptInfo("growVertexSelection(ObjectId)"); emit scriptInfo("growVertexSelection(ObjectId(" + QString::number(_objectId) + "))");
} }
//========================================================= //=========================================================
...@@ -289,7 +289,7 @@ IdList MeshObjectSelectionPlugin::getVertexSelection(int _objectId) { ...@@ -289,7 +289,7 @@ IdList MeshObjectSelectionPlugin::getVertexSelection(int _objectId) {
return IdList(0); return IdList(0);
} }
emit scriptInfo("getVertexSelection(ObjectId)"); emit scriptInfo("getVertexSelection(ObjectId(" + QString::number(_objectId) + "))");
if (object->dataType() == DATA_TRIANGLE_MESH) if (object->dataType() == DATA_TRIANGLE_MESH)
return MeshSelection::getVertexSelection(PluginFunctions::triMesh(object)); return MeshSelection::getVertexSelection(PluginFunctions::triMesh(object));
...@@ -323,7 +323,7 @@ void MeshObjectSelectionPlugin::deleteVertexSelection(int _objectId) { ...@@ -323,7 +323,7 @@ void MeshObjectSelectionPlugin::deleteVertexSelection(int _objectId) {
} }
emit updatedObject(object->id(), UPDATE_ALL); emit updatedObject(object->id(), UPDATE_ALL);
emit scriptInfo("deleteVertexSelection(ObjectId)"); emit scriptInfo("deleteVertexSelection(ObjectId(" + QString::number(_objectId) + "))");
} }
//========================================================= //=========================================================
...@@ -352,7 +352,7 @@ void MeshObjectSelectionPlugin::colorizeVertexSelection(int _objectId, int r, in ...@@ -352,7 +352,7 @@ void MeshObjectSelectionPlugin::colorizeVertexSelection(int _objectId, int r, in
return; return;
} }
emit scriptInfo("colorizeVertexSelection(ObjectId, " emit scriptInfo("colorizeVertexSelection(ObjectId(" + QString::number(_objectId) + "), "
+ QString::number(r) + ", " + QString::number(g) + ", " + QString::number(b) + ")"); + QString::number(r) + ", " + QString::number(g) + ", " + QString::number(b) + ")");
emit updatedObject(_objectId, UPDATE_COLOR); emit updatedObject(_objectId, UPDATE_COLOR);
...@@ -384,7 +384,7 @@ void MeshObjectSelectionPlugin::selectHandleVertices(int _objectId, IdList _vert ...@@ -384,7 +384,7 @@ void MeshObjectSelectionPlugin::selectHandleVertices(int _objectId, IdList _vert
return; return;
} }
QString selection = "selectHandleVertices(ObjectId, [ " + QString::number(_vertexList[0]); QString selection = "selectHandleVertices(ObjectId(" + QString::number(_objectId) + "), [ " + QString::number(_vertexList[0]);
for (uint i = 1 ; i < _vertexList.size(); ++i) { for (uint i = 1 ; i < _vertexList.size(); ++i) {
selection += ", " + QString::number(_vertexList[i]); selection += ", " + QString::number(_vertexList[i]);
...@@ -417,7 +417,7 @@ void MeshObjectSelectionPlugin::unselectHandleVertices(int _objectId, IdList _ve ...@@ -417,7 +417,7 @@ void MeshObjectSelectionPlugin::unselectHandleVertices(int _objectId, IdList _ve
return; return