Skip to content

Commit

Permalink
fix: backup method for meshes
Browse files Browse the repository at this point in the history
  • Loading branch information
germa89 committed Dec 16, 2024
1 parent 4f03b7d commit e574837
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/ansys/mapdl/core/plotting/visualizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -851,4 +851,12 @@ def scene(self):
@property
def meshes(self):
"""Return the meshes."""
return self.scene.meshes
try:
# Pyvista 0.44.2 makes this method to fail, so adding a backup plan
return self.scene.meshes
except AttributeError:
return [
actor.mapper.dataset
for actor in self.scene.actors.values()
if hasattr(actor, "mapper") and hasattr(actor.mapper, "dataset")
]

0 comments on commit e574837

Please sign in to comment.