From: Bruce S. <Bru...@nc...> - 2012-01-30 20:40:39
|
Making the trail object invisible and then deleting it works fine on my Windows machine, so there's definitely something not quite right in the Ubuntu environment. However, if you are going to turn the curve on and off you shouldn't delete the curve. I would suggest the following strategy: When you want the curve associated with your object ufo to disappear, execute ufo.trail_object.pos = [] to get rid of all the points currently in the list of curve points, and execute retain = 0 so that for the time being no more points will be added to the curve. Then when you want to turn on the trail again, set retain back to 50. Bruce Sherwood On Mon, Jan 30, 2012 at 11:43 AM, Spiderdab <77...@ti...> wrote: > On lun, 2012-01-30 at 19:33 +0100, Spiderdab wrote: >> I'm sorry, i don't know why it didn't answer to the list. >> >> On dom, 2012-01-29 at 18:18 -0700, Bruce Sherwood wrote: >> > Perhaps you missed this comment in INSTALL.txt? >> > >> > "You will also need to copy vpython-core2/src/gtk2/site-packages.pth to >> > /usr/lib/python2.6/dist-packages to put /usr/lib/python2.6/site-packages >> > on the Python search path." >> > >> > The details depend on how you specified the configure options, but >> > there was a change in Ubuntu to remove site-packages from the module >> > search path. >> > >> > Bruce Sherwood >> > >> Thanks for answering. >> Yes, That was the missing part. I didn't find that, because i was >> searching for 'vpython-core2'.. maybe that's not clear into >> documentation. >> >> Now i'm finally playing with the trail functionality. >> I would like to turn it on and off, in a way that after i turn it on >> again, the old trace will be erased. >> is there a display cleaner function, or maybe do i have to delete trace >> object? >> >> Thanks, Davide. >> > Hallo again, > i'm trying this way: > if sc.kb.keys: > k = sc.kb.getkey() > if k == "y": > #trace = 1 > ufo = w.box(pos=(0,0,0), size=(50,50,50), make_trail=True, > trail_type="curve", interval=50, retain=50) > #ufo.trail_object.visible = trace > ufo.trail_object.color=grigio > if k == "n": > #trace = 0 > ufo.trail_object.visible = 0 > del ufo.trail_object > > because i've read into the docs on the site that one must make an object > invisible before deleting. > but when i press 'n' to delete the trail_object, it returns a > 'Segmentation fault'. > > Can someone tell me what i'm doing wrong? > Thanks, Davide. > > >> > On Sun, Jan 29, 2012 at 5:16 PM, Spiderdab <77...@ti...> wrote: >> > > Hi all, I'm trying to compile visual 5.72 because the one inside ubuntu >> > > packages is a little old, and i need the trail feature. >> > > After a lot of stress i could compile, on my ubuntu lucid 10.04, but >> > > then i can't find where the lib is! >> > > if i write: >> > > import visual >> > > >> > > the resulting error is: >> > >>>> import visual >> > > Traceback (most recent call last): >> > > File "<stdin>", line 1, in <module> >> > > ImportError: No module named visual >> > > >> > > doing a locate visual gives me no module, only a vpython >> > > inside /usr/bin/ >> > > >> > > What's my error? >> > > or do i have to symlink something? >> > > >> > > Thanks, Davide. >> > > >> > > >> > > ------------------------------------------------------------------------------ >> > > Try before you buy = See our experts in action! >> > > The most comprehensive online learning library for Microsoft developers >> > > is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, >> > > Metro Style Apps, more. Free future releases when you subscribe now! >> > > http://p.sf.net/sfu/learndevnow-dev2 >> > > _______________________________________________ >> > > Visualpython-users mailing list >> > > Vis...@li... >> > > https://lists.sourceforge.net/lists/listinfo/visualpython-users >> > >> > ------------------------------------------------------------------------------ >> > Try before you buy = See our experts in action! >> > The most comprehensive online learning library for Microsoft developers >> > is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, >> > Metro Style Apps, more. Free future releases when you subscribe now! >> > http://p.sf.net/sfu/learndevnow-dev2 >> > _______________________________________________ >> > Visualpython-users mailing list >> > Vis...@li... >> > https://lists.sourceforge.net/lists/listinfo/visualpython-users >> >> >> >> >> ------------------------------------------------------------------------------ >> Try before you buy = See our experts in action! >> The most comprehensive online learning library for Microsoft developers >> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, >> Metro Style Apps, more. Free future releases when you subscribe now! >> http://p.sf.net/sfu/learndevnow-dev2 >> _______________________________________________ >> Visualpython-users mailing list >> Vis...@li... >> https://lists.sourceforge.net/lists/listinfo/visualpython-users > > > > ------------------------------------------------------------------------------ > Try before you buy = See our experts in action! > The most comprehensive online learning library for Microsoft developers > is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, > Metro Style Apps, more. Free future releases when you subscribe now! > http://p.sf.net/sfu/learndevnow-dev2 > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users |