mirror of
https://github.com/lucaspalomodevelop/meshlab.git
synced 2026-03-17 01:54:42 +00:00
add possibility to export textures on nxs/nxz
This commit is contained in:
parent
70bb79d4a9
commit
4a795dacdf
2
src/external/nexus
vendored
2
src/external/nexus
vendored
@ -1 +1 @@
|
||||
Subproject commit c27d9bce0a8dc933ba7513da9ff95a73a76c5309
|
||||
Subproject commit 61536927f71dcab499d1db26c8913ed932dd4afa
|
||||
@ -203,12 +203,15 @@ void IONXSPlugin::saveNxs(
|
||||
|
||||
loader = new VcgLoader<CMeshO>;
|
||||
|
||||
std::vector<QImage> textures;
|
||||
|
||||
loader->load(&m.cm, has_colors, has_normals, has_textures);
|
||||
stream->load(loader);
|
||||
|
||||
//WORKAROUND to save loading textures not needed
|
||||
if(!(components & NexusBuilder::TEXTURES)) {
|
||||
stream->textures.clear();
|
||||
if((components & NexusBuilder::TEXTURES)) {
|
||||
for (const std::string& tn : m.cm.textures){
|
||||
textures.push_back(m.getTexture(tn));
|
||||
}
|
||||
}
|
||||
|
||||
NexusBuilder builder(components);
|
||||
@ -221,10 +224,7 @@ void IONXSPlugin::saveNxs(
|
||||
if(deepzoom)
|
||||
builder.header.signature.flags |= nx::Signature::Flags::DEEPZOOM;
|
||||
builder.tex_quality = tex_quality;
|
||||
bool success = builder.initAtlas(stream->textures);
|
||||
if(!success) {
|
||||
throw MLException("Fail");
|
||||
}
|
||||
builder.initAtlas(textures);
|
||||
if(point_cloud)
|
||||
tree = new KDTreeCloud("cache_tree", adaptive.toFloat());
|
||||
else
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user