View Single Post
  #4  
Old 07-05-2010, 03:06 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
You'll need to remove the cylinder you already added to see the new clinder you add with a smaller radius:
Code:
import viz
import vizshape

viz.go()

viz.MainView.setPosition(0,0,-4)

slider = viz.addSlider()
slider.setPosition(0.2, 0.1)
slider.set(0.1)

myshape = vizshape.addCylinder(height=1.0,bottomRadius=0.5,topRadius=0.1)

def changeRadius(pos):
	global myshape
	myshape.remove()
	myshape = vizshape.addCylinder(height=1.0,bottomRadius=0.5,topRadius=slider.get())

vizact.onslider(slider, changeRadius)
Reply With Quote