PDA

View Full Version : Hide Objects in a Model


Seadna
11-24-2015, 03:27 AM
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'

viz.go()

def HideObject(CurObject):
CurObject.disable(viz.RENDERING)

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

viz.go()

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.