WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Hide Objects in a Model (https://forum.worldviz.com/showthread.php?t=5559)

Seadna 11-24-2015 04: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):

Code:

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 06:08 PM

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

Code:

import viz
import vizact

viz.go()

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


Seadna 12-10-2015 07:32 AM

That's great Jeff thank you.


All times are GMT -7. The time now is 02:58 PM.

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