WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 08-20-2009, 03:38 AM
jaclyn.bill jaclyn.bill is offline
Member
 
Join Date: Oct 2007
Posts: 42
removing clones

Dear users,

I'm running an experiment in which 2/3 trial require poles to be places in the scene, and one trial requires these to be removed.

Early on in my script I use

Code:
def addcones():
	global cone
	###########code for placing cones
	for place in (positionlistA,positionlistB,positionlistC,positionlistD,positionlistE):
		pos = (place)
		cone = viz.add('pole.wrl',cache=viz.CACHE_CLONE,pos=pos)
		cone.color(0,1,0)
		cone.setScale(2,0.05,2)
#cones.append(cone)
		if place[3] >0:
			cone.setPosition(1,0,0,viz.REL_LOCAL) 
		if place[3] <0:
			cone.setPosition(-1,0,0,viz.REL_LOCAL)
to add the cones and in my trial selection function I use the same code but just remove the cones from the scene.

Code:
if trialtype ==0:
			viz.MainScene.visible(viz.OFF,viz.WORLD)
			yield viztask.waitTime(5)
			trial.message('Heading')
			yield viztask.waitTime(5)
			trial.remove()
			createpath()
			cone.remove()
			passiveheading()
			yield viztask.waitTime(0.5)
			viz.MainScene.visible(viz.ON,viz.WORLD)
			yield viztask.waitTime(16.9)
to remove the cones before running the trial. However, it only removes one cone. My understanding is that clones should copy the original? Is this not the case?

I'd appreciate any pointers on this. Many Thanks in advance.
Reply With Quote
 


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
removing multiple objects durf Vizard 7 08-05-2009 09:15 AM
removing and obj with a timer durf Vizard 0 06-04-2009 07:16 AM
Removing Vertices from an On-The-Fly Object shivanangel Vizard 1 11-05-2008 01:38 PM
executable - removing models Dave Vizard 2 05-13-2008 02:58 AM


All times are GMT -7. The time now is 07:57 AM.


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