Skip to content

Make pymeshlab imports lazy in exporter utilities - #3797

Open
AdityaKharmaleGoat7 wants to merge 1 commit into
nerfstudio-project:mainfrom
AdityaKharmaleGoat7:fix/lazy-pymeshlab-import
Open

AdityaKharmaleGoat7 wants to merge 1 commit into
nerfstudio-project:mainfrom
AdityaKharmaleGoat7:fix/lazy-pymeshlab-import

Conversation

@AdityaKharmaleGoat7

Copy link
Copy Markdown

Summary

This makes pymeshlab imports lazy in exporter code so importing non-meshing exporter functionality does not initialize pymeshlab unnecessarily.

Changes

  • move the pymeshlab import in exporter_utils.py into get_mesh_from_filename()
  • keep the pymeshlab.Mesh annotation available under TYPE_CHECKING
  • move the pymeshlab import in tsdf_utils.py into TSDF.export_mesh()
  • add a regression test that imports both exporter modules with pymeshlab unavailable

Scope

This intentionally does not change the dependency declarations in pyproject.toml. It is a small first step toward decoupling meshing dependencies and avoids changing installation semantics in the same PR.

Related to #3712

This branch has not been deployed

No deployments
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.

1 participant