Skip to content

Commit

Permalink
Merge pull request #6 from Geode-solutions/feat_delete_object_pipeline
Browse files Browse the repository at this point in the history
Feat delete object pipeline
  • Loading branch information
JulienChampagnol authored Sep 22, 2023
2 parents 129f762 + a4d4454 commit 364da90
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions vtk_protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,18 @@ def create_object_pipeline(self, params):
except Exception as e:
print("error : ", str(e), flush=True)

@exportRpc("delete_object_pipeline")
def delete_object_pipeline(self, params):
print(f"{params=}", flush=True)
id = params["id"]
object = self.get_object(id)
actor = object["actor"]
renderWindow = self.getView("-1")
renderer = renderWindow.GetRenderers().GetFirstRenderer()
renderer.RemoveActor(actor)
self.deregister_object(id)
self.render()

@exportRpc("toggle_object_visibility")
def toggle_object_visibility(self, params):
print(f"{params=}", flush=True)
Expand Down

0 comments on commit 364da90

Please sign in to comment.