Skip to content

Commit 9a7900a

Browse files
fix: handle properly multi_colors=False (#172)
Co-authored-by: pyansys-ci-bot <[email protected]>
1 parent c139212 commit 9a7900a

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

doc/changelog.d/172.fixed.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
fix: handle properly multi_colors=False

src/ansys/tools/visualization_interface/backends/pyvista/pyvista_interface.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ def set_add_mesh_defaults(self, plotting_options: Optional[Dict]) -> None:
356356
# This method should only be applied in 3D objects (bodies and components)
357357
if "smooth_shading" not in plotting_options:
358358
plotting_options.setdefault("smooth_shading", True)
359-
if all(entry not in plotting_options for entry in ["color", "multi_colors"]):
359+
if "color" not in plotting_options and not plotting_options.get("multi_colors", False):
360360
plotting_options.setdefault("color", Color.DEFAULT.value)
361361

362362
@property

0 commit comments

Comments
 (0)