Toggling Mesh Visibility #427
-
Hello, I am using GoKi to make a 3D model viewer. My models consist of many different meshes and I wish to toggle the visibility of specific meshes such that I can hide/show parts of my models at will. Are there any ways to do this within the GoKi framework? Currently I am trying to accomplish this by deleting the meshes from the scene each time and then reading them back in from the file when I want to hide/show them, but I haven't gotten this to work yet. Any advice is appreciated. Thanks, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
There is a gi.Node flag Programmatically, you can just call Hope that helps.
|
Beta Was this translation helpful? Give feedback.
There is a gi.Node flag
Invisible
which when set will make that Node (either a gi3d.Group or gi3d.Solid) invisible. You can do this interactively in gi3dviewer by loading an obj, clicking onEdit Scene
button, editing the Children of the scene, and then selecting GoGiEditor on the first child -- this brings up a tree view of the whole loaded object structure -- then scroll the Flag field until you get to Invisible, toggle it, and then clickUpdate
on the scene dialog.Programmatically, you can just call
SetInvisible()
orClearInvisible()
on any node.Hope that helps.