It looks like you're new here. If you want to get involved, click one of these buttons!
I have a PCell that can use a Path as part of its shape control. Now, in some cases I do not want to use the path and then I like to hide it. I created the path in my PCell __init__
as:
self.param("path", self.TypeShape, "TLine", default = pya.DPath([pya.DPoint(0, 0), pya.DPoint(100, 0)], 0), hidden=True)
This hides the Path, however doing
self.path.hidden = False
does not make it visible again.
Anyone knows if it is possible to toggle visibility of a Path in a PCell?
Thanks
Comments
Hi @ravn,
currently (with 0.27), the hidden feature is not dynamic - you can set it at the beginning, but not change it.
In 0.28 you will be able to dynamically change the visibility of a parameter in a new PCell method called "callback". This method is called whenever a parameter is changed or once initially. So you can implement logic there which controls aspects of the parameters, like in this sample:
Matthias
Thanks!