Skip to content

Commit

Permalink
fix: Default plotting options fix
Browse files Browse the repository at this point in the history
  • Loading branch information
AlejandroFernandezLuces committed Feb 14, 2024
1 parent ca66ff2 commit 437d1a9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/ansys/visualizer/interfaces/pyvista_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,8 +344,10 @@ def set_add_mesh_defaults(self, plotting_options: Optional[Dict]) -> None:
# If the following keys do not exist, set the default values
#
# This method should only be applied in 3D objects: bodies, components
plotting_options.setdefault("smooth_shading", True)
plotting_options.setdefault("color", Colors.DEFAULT_COLOR.value)
if "smooth_shading" not in plotting_options:
plotting_options.setdefault("smooth_shading", True)
if "color" not in plotting_options:
plotting_options.setdefault("color", Colors.DEFAULT_COLOR.value)

@property
def object_to_actors_map(self) -> Dict[pv.Actor, MeshObjectPlot]:
Expand Down

0 comments on commit 437d1a9

Please sign in to comment.