From 728692eba125e786210d57aab1b3d266b923df39 Mon Sep 17 00:00:00 2001 From: "David J. Bremer" Date: Thu, 10 Oct 2024 14:59:10 -0400 Subject: [PATCH] For parts colored by a var, incorporate the variable hash into the hash used for the part name. Fixes a problem where changing the palette and pushing to an existing scene does not result in a part update. --- src/ansys/pyensight/core/utils/dsg_server.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/ansys/pyensight/core/utils/dsg_server.py b/src/ansys/pyensight/core/utils/dsg_server.py index 2640728e6a..d5ae9a5d28 100644 --- a/src/ansys/pyensight/core/utils/dsg_server.py +++ b/src/ansys/pyensight/core/utils/dsg_server.py @@ -101,6 +101,12 @@ def update_geom(self, cmd: dynamic_scene_graph_pb2.UpdateGeom) -> None: self.tcoords[ cmd.chunk_offset : cmd.chunk_offset + len(cmd.flt_array) ] = cmd.flt_array + + # Add the variable hash to the Part's hash, to pick up palette changes + var_cmd = self.session.variables.get(cmd.variable_id, None) + if var_cmd is not None: + self.hash.update(var_cmd.hash.encode("utf-8")) + if self.cmd.node_size_variableid == cmd.variable_id: # type: ignore # Receive the node size var values if self.node_sizes.size != cmd.total_array_size: