pyvista / pyvista

3D plotting and mesh analysis through a streamlined interface for the Visualization Toolkit (VTK)

Home Page:https://docs.pyvista.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

renderer.bounds iterate over a list of actors

ndelpuppo opened this issue · comments

Describe the feature you would like to be added.

When we call the Camera copy() method, the Renderer object calls the bounds() method. Now, if we add actors to the scene using a background concurrent process to preload data, the self._actors dictionary changes size and this generates an error as we iterate over the dictionary values at line 460 in pyvista/plotting/renderer.py:
for actor in self._actors.values():
Would it be possible to change this line to:
for actor in list(self._actors.values()):
?