#1
|
|||
|
|||
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) 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) I'd appreciate any pointers on this. Many Thanks in advance. |
#2
|
|||
|
|||
p.s the cone.visible(viz.OFF) command only hides one cone also.
|
#3
|
|||
|
|||
Removing an object will NOT remove clones of it. You will need to call remove() on each individual cloned object, just like any other object.
|
|
|
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 |