Skip to content
This repository was archived by the owner on Apr 17, 2026. It is now read-only.
This repository was archived by the owner on Apr 17, 2026. It is now read-only.

Plotter window freezes when setting opacity for add_mesh #128

@danpak94

Description

@danpak94

Description

The plotter window freezes when I try to set the opacity value to any value other than 1 for the add_mesh function. This problem also seems to occur when I'm using constant color; if I use mesh = py.Plane() instead (which contains mesh.point_arrays['TextureCoordinates']), the window no longer freezes.

I reproduced this error on both Spyder and command prompt. I am using Python version 3.6.6, pyvista version 0.23.1 (conda-forge).

I would really appreciate your help solving this issue!

Edit: problem occurs on Windows 10 with Python 3.6.6, but not on Ubuntu 16.04.02 LTS with Python 3.6.10..

Simple code to reproduce the issue:

import argparse
import pyvista as pv
from pyvista import examples

if __name__ == '__main__':
    parser = argparse.ArgumentParser()
    parser.add_argument("-o", "--opacity", default=1, type=float)
    args = parser.parse_args()
    
    opacity = args.opacity
    
    print('opacity: {}'.format(opacity))
    
    mesh = examples.download_bunny_coarse()
    # mesh = py.Plane()
    
    plotter = pv.Plotter(notebook=False)
    actor = plotter.add_mesh(mesh, opacity=opacity)
    plotter.show()

Example Data

No example data provided because issue is reproducible with meshes provided within the library.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugplottingGeneral plotting/rendering topics

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions