WorldViz User Forum

WorldViz User Forum (
-   Vizard (
-   -   Hide Objects in a Model (

Seadna 11-24-2015 03:27 AM

Hide Objects in a Model
Hi folks,

Hopefully you can help with this.

I am trying to hide parts of a model. I have a model file which is quite large and it has a lot of objects in it. Is it possible to hide some of these individually? I want to be able to press a key to hide certain objects.

I was thinking it could be somewhere along the line of this (but i am very new to Python):


import viz
import vizinput
import vizact

ModelFile = 'model.ive'


def HideObject(CurObject):
vizact.onkeydown('q', HideObject(ModelFile.Wall1))

Any help is much appreciated!

Jeff 11-30-2015 05:08 PM

It's possible to hide sub-parts of a model. Here's an example:


import viz
import vizact


piazza = viz.addChild('piazza.osgb')
vizact.onkeydown(' ',piazza.visible,viz.TOGGLE,'pz_ground-GEODE')

Seadna 12-10-2015 06:32 AM

That's great Jeff thank you.

All times are GMT -7. The time now is 03:43 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2021, vBulletin Solutions, Inc.
Copyright 2002-2018 WorldViz LLC