From: Bruce S. <Bru...@nc...> - 2009-01-20 19:18:21
|
There is what seems to me strange code involved. scene.range is initialized to (0,0,0) and remains like that unless you set scene.range yourself. Then there's some hocus-pocus to make (0,0,0) act essentially like (10,10,10) if you specify scene.autoscale = 0. The error message is generated if autoscale=0 OR if range=(0,0,0). I guess the notion was that you should specify a range explicitly if you turn off autoscaling. Or something. This all seems way too arcane. It would seem to make more sense to initialize range to (10,10,10), which is what the situation was in Visual 3. But maybe I'm missing something. In the following example the first print statement works and the second fails: from visual import * scene.range = 3 print scene.range sphere() scene.autoscale = 1 print scene.range Bruce Sherwood Joe Heafner wrote: > When I run this code: > > from visual import * > > scene.autoscale = 0 > print scene.range > sphere() > print scene.range > > I get this: > > >>> ================================ RESTART > ================================ > >>> > > Traceback (most recent call last): > File "/Users/heafnerj/Desktop/widthtest.py", line 4, in <module> > print scene.range > RuntimeError: Reading .scale and .range is not supported when autoscale > is enabled. > >>> > > I thought scene.autoscale = 0 disables autoscaling. Is this a bug? > > Joe > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by: > SourcForge Community > SourceForge wants to tell your story. > http://p.sf.net/sfu/sf-spreadtheword > > > ------------------------------------------------------------------------ > > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users |