Plotter.import_gltf#
- Plotter.import_gltf(filename: str | Path, set_camera: bool = True) None[source]#
Import a glTF file into the plotter.
See https://www.khronos.org/gltf/ for more information.
Examples#
Download Python source code | Download Jupyter notebook
>>> import pyvista as pv
>>> from pyvista import examples
>>> helmet_file = examples.download_damaged_helmet(load=False)
>>> texture = examples.download_dikhololo_night()
>>> pl = pv.Plotter()
>>> pl.import_gltf(helmet_file)
>>> pl.set_environment_texture(texture)
>>> pl.camera.zoom(1.8)
>>> pl.show()
See Also#
pyvista.GLTFReaderRead GLTF file as a mesh.
Used In#
Docstring Examples
download_avocado(1 use)download_damaged_helmet(1 use)download_gearbox(1 use)download_milk_truck(1 use)
Gallery Examples