Hi all,
i would like to hide and show again a SoNode in coin3d.
To create a line with coin i use the root SoSeparator from the gui ViewProvider and add a new child. The child is my line with material and position.
This works fine and i can see the line.
Now i want to hide the line, and show it later again. Since today i always deleting the node when i wanted to hide it. And created new when showing it. But when the object is not just a line this is time consumption. So i want to hide the object and the later show it again. But i have not found a solution to disable/hide the node. Can anyone give me a hint where i need to search?
BR Manuel
[SOLVED] Show/Hide object in coin3d
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
[SOLVED] Show/Hide object in coin3d
Last edited by apeltauer on Tue Jun 16, 2020 2:38 pm, edited 1 time in total.
Re: Show/Hide object in coin3d
You can put your nodes under a Switch :
Code: Select all
my_switch = coin.SoSwitch()
# show children
my_switch.whichChild = coin.SO_SWITCH_ALL
# hide children
my_switch.whichChild = coin.SO_SWITCH_NONE
[Solved] Re: Show/Hide object in coin3d
works like a charm....Chris_G wrote: ↑Tue Jun 16, 2020 9:59 am You can put your nodes under a Switch :Code: Select all
my_switch = coin.SoSwitch() # show children my_switch.whichChild = coin.SO_SWITCH_ALL # hide children my_switch.whichChild = coin.SO_SWITCH_NONE
thanks.....