WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 06-01-2005, 11:54 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Hi Stefan,

I tried your sample code on a model here and it worked fine. This is the code I used to test it:
Code:
import viz
viz.go()

viz.move(0,0,-10)

def onkeydown(key):
	global tile,child
	if key == ' ':
		tile = viz.add('testviz/reflect_logo.3ds')
		child = tile.getchild('Sphere01')
		child.parent(tile)
	elif key == 'r':
		tile.remove()

viz.callback(viz.KEYDOWN_EVENT,onkeydown)
Let me know if I am doing anything different.

Also, why are you reparenting the child after you get it? When you get a child from a model Vizard retains its hierarchical structure.
Reply With Quote
Reply

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


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


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