0

I have a task to render images for a given sample size. At first, I add 5 meshes to pyrender scene, render the image, and remove the meshes from the scene. This iteration is continued for the given sample size. However, in the second loop, I get this error ValueError: Mesh is already bound to a context

Could anyone help me understand what this error means and how I can rectify this? Thank you.

Viole
  • 11
  • 2

1 Answers1

1

I also encounter this problem. And I think this is caused by that you have added this mesh to a renderer. After that, if you remove the mesh, the mesh have still been changed in some way(which is "bound to a context")

In my code, my solution is to reload the mesh file.

That will be OK.

YanjieZe
  • 329
  • 1
  • 5