WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 11-24-2015, 03:27 AM
Seadna Seadna is offline
Member
 
Join Date: Nov 2015
Posts: 40
Question 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!
Reply With Quote
  #2  
Old 11-30-2015, 05:08 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
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')
Reply With Quote
  #3  
Old 12-10-2015, 06:32 AM
Seadna Seadna is offline
Member
 
Join Date: Nov 2015
Posts: 40
That's great Jeff thank you.
Reply With Quote
Reply

Tags
hide objects, model, python, sub nodes, visibility

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
artoolkit load 3d objects into application xcuddlex Vizard 8 04-18-2011 02:00 AM
Change model alpha and memory leak hosier Vizard 2 06-25-2009 10:55 AM
Using hand model to grab objects without glove? cgibb Vizard 3 06-01-2009 06:43 PM
Lightwave objects rotation problem hosier Vizard 6 02-13-2009 12:04 PM
Could not find plugin to load objects... halley Vizard 1 05-30-2006 11:01 AM


All times are GMT -7. The time now is 09:22 AM.


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