ipygany icon indicating copy to clipboard operation
ipygany copied to clipboard

Hide Mesh

Open akaszynski opened this issue 4 years ago • 1 comments

Great work with this module!

Is there any way of toggling the visibility of a mesh? I'm trying to incorporate this with ipytree, but there's no callback or trait that lets me toggle the global visibility of a mesh. Is this a low hanging PR?

akaszynski avatar Mar 13 '21 18:03 akaszynski

Thanks for the kind words!

I'm trying to incorporate this with ipytree

I originally created ipytree with this exact purpose in mind!

but there's no callback or trait that lets me toggle the global visibility of a mesh. Is this a low hanging PR?

It's unfortunately not possible as of today. And it requires changes in https://github.com/QuantStack/GanyJS. It would need adding a setter for visible just like for the defaultColor in here: https://github.com/QuantStack/GanyJS/blob/master/src/Block.ts#L192 (this requires adding a setter for visible in this class as well that does this.mesh.visible = visibility).

Then we need to update ipygany to expose the visible trait to Python.

martinRenou avatar Mar 15 '21 07:03 martinRenou