From b2f6982fc4277cb5f773bb4335abd4c3a55f3355 Mon Sep 17 00:00:00 2001 From: Paolo Cignoni cignoni Date: Fri, 3 Apr 2009 09:53:29 +0000 Subject: [PATCH] fixed Smartblend bug under windows --- .../edit_phototexturing/src/PhotoTexturer.cpp | 5 +++++ .../edit_phototexturing/src/PhotoTexturer.h | 1 + .../src/SmartBlendTextureMerger.cpp | 12 ++++++++++-- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/meshlabplugins/edit_phototexturing/src/PhotoTexturer.cpp b/src/meshlabplugins/edit_phototexturing/src/PhotoTexturer.cpp index 6937cebc3..468c0c76e 100644 --- a/src/meshlabplugins/edit_phototexturing/src/PhotoTexturer.cpp +++ b/src/meshlabplugins/edit_phototexturing/src/PhotoTexturer.cpp @@ -1015,3 +1015,8 @@ void PhotoTexturer::calculateZBuffer(MeshModel *mm,Camera* camera,QuadTreeNode * } } + +void PhotoTexturer::reset(){ + +} + diff --git a/src/meshlabplugins/edit_phototexturing/src/PhotoTexturer.h b/src/meshlabplugins/edit_phototexturing/src/PhotoTexturer.h index 262b4fa6e..e6aa61b18 100644 --- a/src/meshlabplugins/edit_phototexturing/src/PhotoTexturer.h +++ b/src/meshlabplugins/edit_phototexturing/src/PhotoTexturer.h @@ -157,6 +157,7 @@ public: QImage mergeTextureImagesWinnerTakesAll(int imgWidth, int imgHeight, QList imgList); + void reset(); void calculateZBuffer(MeshModel *mm, Camera* camera, QuadTreeNode *qtree, TextureFilterZB *zbuffer); private: diff --git a/src/meshlabplugins/edit_phototexturing/src/SmartBlendTextureMerger.cpp b/src/meshlabplugins/edit_phototexturing/src/SmartBlendTextureMerger.cpp index 1929b9623..30dbe396a 100644 --- a/src/meshlabplugins/edit_phototexturing/src/SmartBlendTextureMerger.cpp +++ b/src/meshlabplugins/edit_phototexturing/src/SmartBlendTextureMerger.cpp @@ -27,15 +27,23 @@ SmartBlendTextureMerger::SmartBlendTextureMerger(QString command){ normalized = false; - command = command.replace(" ","\\ "); + #ifdef _WIN32 - cmd = command; + if (command.indexOf("\"")==0 && command.lastIndexOf("\"")== command.size()){ + cmd = command; + }else{ + cmd = "\"" + command + "\""; + } + + #else + command = command.replace(" ","\\ "); cmd ="wine "+command; #endif + qDebug()<<"cmd: "<