polyscope icon indicating copy to clipboard operation
polyscope copied to clipboard

How to register a structure in nested show()

Open jabruniessner opened this issue 3 years ago • 0 comments

Hey there,

as I can read, there is the possibility to do a nested show. That means one can call the ps::show() function a second time. Now I don't seem to understand what I need to do in order to register strutures in the second show. As an example I currently have the following code

`

 def callback():
   

    if psim.Button("Show"):
    
      ps.show()
      ms = pymeshlab.MeshSet()
      ms.load_new_mesh(os.getcwd()+"/Experiment-78/Experiment-78+curvature.ply")
      vertices = ms.current_mesh().vertex_matrix()
      faces = ms.current_mesh().face_matrix()
      ps.set_invoke_user_callback_for_nested_show(True)
      ps.register_surface_mesh("first mesh", vertices, faces)

(This example is in python but the structure is sufficiently similar). Currently when I press the button the surface mesh is registered in the first show. What do I need to do in order to get it in the second show?

(I am happy about a solution in either C++ or python)

I hope you get what I mean

jabruniessner avatar May 24 '22 14:05 jabruniessner