Skip to content

Keep missing texture names, plus added flag in Set Texture for texture substitution.#1629

Merged
alemuntoni merged 4 commits intocnr-isti-vclab:develfrom
Sallo97:devel
Dec 18, 2025
Merged

Keep missing texture names, plus added flag in Set Texture for texture substitution.#1629
alemuntoni merged 4 commits intocnr-isti-vclab:develfrom
Sallo97:devel

Conversation

@Sallo97
Copy link

@Sallo97 Sallo97 commented Dec 9, 2025

Same pull-request proposed in #1627 and #1628 , only on the devel branch.

Avoid deleting original texture names when loading

When loading a mesh, if meshlab was not able to find the associated texture files, it uses a dummy texture instead, named dummy.png. However, in doing so it also removes any mention to the absent texture(s). I modified the loading mesh process in src/common/ml_document/mesh_model.cpp to keep its missing texture name(s) list by commenting line 124 in src/common/ml_document/mesh_model.cpp:

// textName = "dummy.png";

Adding possibility of not erasing all the names in the Set Texture

When setting a new texture to a loaded mesh with the filter Set Texture, it clears all information regarding previous associated ones. This can be frustrating when meshlab loaded a mesh with missing texture, for which the user wants to manually load them up.

My solution consists in adding the boolean parameter updateExistingTexture to filter_texture s.t., each time a texture is loaded and the flag activated, then the filter does not clear any previously loaded mesh and instead if a texture with the same name of the new loaded file exists, its content is substitued with the one provided by the user.

@alemuntoni
Copy link
Member

Thanks for the PR!
There are some build issues on macos due probably to some dependencies that must be updated. In any case, they aren't caused by your edits. I'll work and fix them ASAP.

@alemuntoni
Copy link
Member

Thanks @Sallo97!

@alemuntoni alemuntoni merged commit e72ba72 into cnr-isti-vclab:devel Dec 18, 2025
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants