diff --git a/doc/changelog.d/172.fixed.md b/doc/changelog.d/172.fixed.md new file mode 100644 index 00000000..4476ffce --- /dev/null +++ b/doc/changelog.d/172.fixed.md @@ -0,0 +1 @@ +fix: handle properly multi_colors=False \ No newline at end of file diff --git a/src/ansys/tools/visualization_interface/backends/pyvista/pyvista_interface.py b/src/ansys/tools/visualization_interface/backends/pyvista/pyvista_interface.py index 5776c740..f22afe5c 100644 --- a/src/ansys/tools/visualization_interface/backends/pyvista/pyvista_interface.py +++ b/src/ansys/tools/visualization_interface/backends/pyvista/pyvista_interface.py @@ -356,7 +356,7 @@ def set_add_mesh_defaults(self, plotting_options: Optional[Dict]) -> None: # This method should only be applied in 3D objects (bodies and components) if "smooth_shading" not in plotting_options: plotting_options.setdefault("smooth_shading", True) - if all(entry not in plotting_options for entry in ["color", "multi_colors"]): + if "color" not in plotting_options and not plotting_options.get("multi_colors", False): plotting_options.setdefault("color", Color.DEFAULT.value) @property