mirror of
https://github.com/lucaspalomodevelop/meshlab.git
synced 2026-03-16 17:44:36 +00:00
fix loading textures
This commit is contained in:
parent
3135c85a95
commit
4178eaf019
@ -58,8 +58,18 @@ FilterLayerPlugin::FilterLayerPlugin()
|
||||
FP_IMPORT_CAMERAS
|
||||
};
|
||||
|
||||
for(ActionIDType tt: types())
|
||||
actionList.push_back(new QAction(filterName(tt), this));
|
||||
QCoreApplication* app = QCoreApplication::instance();
|
||||
|
||||
for(ActionIDType tt: types()) {
|
||||
QAction* act = new QAction(filterName(tt), this);
|
||||
actionList.push_back(act);
|
||||
|
||||
if (app != nullptr) {
|
||||
if(tt==FP_DELETE_MESH){
|
||||
act->setShortcut(Qt::CTRL + Qt::Key_D);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
QString FilterLayerPlugin::pluginName() const
|
||||
|
||||
@ -240,7 +240,7 @@ void loadMeshPrimitive(
|
||||
}
|
||||
if (textureImg != -1) { //if we found a texture
|
||||
//add the path of the texture to the mesh
|
||||
std::string uri = model.images[textureImg].uri;
|
||||
std::string uri = model.images[model.textures[textureImg].source].uri;
|
||||
uri = std::regex_replace(uri, std::regex("\\%20"), " ");
|
||||
m.cm.textures.push_back(uri);
|
||||
//set the id of the texture: we need it when set uv coords
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user